diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-10-03 12:00:11 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-10-06 17:54:56 -0700 |
commit | 25f451432ec75a80b16cd093d01897ae7439788d (patch) | |
tree | a67cf999d21f4487790ffb8cadf073b6f71fae34 /lib/util.c | |
parent | 8b6c2c88db1c7ee3b910c3b720f3a2469d6c855d (diff) | |
download | openvswitch-25f451432ec75a80b16cd093d01897ae7439788d.tar.gz |
util: Use MSVC compiler intrinsic for clz and ctz.
Using the compiler intrinsic shows approximately around 25% speed
up with some classifier specific unit tests.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/util.c')
-rw-r--r-- | lib/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.c b/lib/util.c index f3e47b131..01fe7dcd4 100644 --- a/lib/util.c +++ b/lib/util.c @@ -949,7 +949,7 @@ english_list_delimiter(size_t index, size_t total) } /* Returns the number of trailing 0-bits in 'n'. Undefined if 'n' == 0. */ -#if __GNUC__ >= 4 +#if __GNUC__ >= 4 || _MSC_VER /* Defined inline in util.h. */ #else /* Returns the number of trailing 0-bits in 'n'. Undefined if 'n' == 0. */ |