Add some likely / unlikely to some tests.

Probably useless.
This commit is contained in:
Patrick Pelissier committed 2017-03-27 23:06:02 +02:00
1 parent c6babc8856
commit ff2c6d51e6
2 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -288,7 +288,7 @@
M_C3(dict_pair_,name,_init_set2)(*M_C3(list_dict_pair_,name,_push_raw)(*list_ptr), \
key M_IF(isSet)(, M_DEFERRED_COMMA value)); \
map->used ++; \
if (map->used > map->upper_limit) \
if (M_UNLIKELY (map->used > map->upper_limit) ) \
M_C3(dicti_,name,_resize_up)(map); \
} \
\
@@ -312,7 +312,7 @@
break; \
} \
} \
if (map->used < map->lower_limit) \
if (M_UNLIKELY (map->used < map->lower_limit) ) \
M_C3(dicti_, name, _resize_down)(map); \
} \
\
+5 -5
View File
@@ -212,7 +212,7 @@ typedef enum {
/* If nothing, create new node */ \
if (n == NULL) { \
n = M_GET_NEW oplist(node_t); \
if (n == NULL) { \
if (M_UNLIKELY (n == NULL)) { \
M_MEMORY_FULL(sizeof (node_t)); \
return; \
} \
@@ -251,7 +251,7 @@ typedef enum {
} \
/* Create new */ \
n = M_GET_NEW oplist(node_t); \
if (n == NULL) { \
if (M_UNLIKELY (n == NULL) ) { \
M_MEMORY_FULL (sizeof (node_t)); \
return; \
} \
@@ -511,7 +511,7 @@ typedef enum {
{ \
RBTREEI_CONTRACT (tree); \
node_t *n = tree->node; \
if (n == NULL) return NULL; \
if (M_UNLIKELY (n == NULL) ) return NULL; \
while (n->child[0] != NULL) { \
RBTREEI_CONTRACT_NODE (n); \
n = n->child[0]; \
@@ -524,7 +524,7 @@ typedef enum {
{ \
RBTREEI_CONTRACT (tree); \
node_t *n = tree->node; \
if (n == NULL) return NULL; \
if (M_UNLIKELY (n == NULL) ) return NULL; \
while (n->child[1] != NULL) { \
RBTREEI_CONTRACT_NODE (n); \
n = n->child[1]; \
@@ -575,7 +575,7 @@ typedef enum {
{ \
if (o == NULL) return NULL; \
node_t *n = M_GET_NEW oplist(node_t); \
if (n == NULL) { \
if (M_UNLIKELY (n == NULL) ) { \
M_MEMORY_FULL (sizeof (node_t)); \
return NULL; \
} \