2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

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>
This commit is contained in:
Gurucharan Shetty
2014-10-03 12:00:11 -07:00
parent 8b6c2c88db
commit 25f451432e
2 changed files with 37 additions and 1 deletions

View File

@@ -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. */