Changeset 1840 for trunk/src/kmk/variable.c
- Timestamp:
- Oct 11, 2008, 9:59:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/variable.c
r1829 r1840 352 352 #else /* VARIABLE_HASH */ 353 353 354 # ifdef __GNUC__355 # define PREDICT_TRUE(expr) __builtin_expect(!!(expr), 1)356 # define PREDICT_FALSE(expr) __builtin_expect(!!(expr), 0)357 # else358 # define PREDICT_TRUE(expr) (expr)359 # define PREDICT_FALSE(expr) (expr)360 # endif361 362 354 inline static int 363 355 variable_hash_cmp_2_memcmp (const char *xs, const char *ys, unsigned int length) … … 446 438 result = *(int32_t*)xs - *(int32_t*)ys; 447 439 result |= *(int32_t*)(xs + 4) - *(int32_t*)(ys + 4); 448 if ( PREDICT_FALSE(result))440 if (MY_PREDICT_FALSE(result)) 449 441 return result; 450 442 xs += 8; … … 514 506 result |= xs[4] - ys[4]; 515 507 #endif 516 if ( PREDICT_FALSE(result))508 if (MY_PREDICT_FALSE(result)) 517 509 return result; 518 510 xs += 8; … … 559 551 result = (x->hash1 - y->hash1) 560 552 | (x->length - y->length); 561 if ( PREDICT_TRUE(result))553 if (MY_PREDICT_TRUE(result)) 562 554 return result; 563 555
Note:
See TracChangeset
for help on using the changeset viewer.