mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
branches/zip: Add UNIV_UNLIKELY hints to help branch prediction.
This commit is contained in:
parent
a4b26c4ffb
commit
021fea8f15
2 changed files with 3 additions and 3 deletions
|
@ -73,12 +73,12 @@ the pointer to the node to be added to the list. NAME is the list name. */
|
||||||
((BASE).count)++;\
|
((BASE).count)++;\
|
||||||
((N)->NAME).next = (BASE).start;\
|
((N)->NAME).next = (BASE).start;\
|
||||||
((N)->NAME).prev = NULL;\
|
((N)->NAME).prev = NULL;\
|
||||||
if ((BASE).start != NULL) {\
|
if (UNIV_LIKELY((BASE).start != NULL)) {\
|
||||||
ut_ad((BASE).start != (N));\
|
ut_ad((BASE).start != (N));\
|
||||||
(((BASE).start)->NAME).prev = (N);\
|
(((BASE).start)->NAME).prev = (N);\
|
||||||
}\
|
}\
|
||||||
(BASE).start = (N);\
|
(BASE).start = (N);\
|
||||||
if ((BASE).end == NULL) {\
|
if (UNIV_UNLIKELY((BASE).end == NULL)) {\
|
||||||
(BASE).end = (N);\
|
(BASE).end = (N);\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
|
|
|
@ -533,7 +533,7 @@ rec_get_offsets_func(
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(!offsets)
|
if (UNIV_UNLIKELY(!offsets)
|
||||||
|| UNIV_UNLIKELY(rec_offs_get_n_alloc(offsets) < size)) {
|
|| UNIV_UNLIKELY(rec_offs_get_n_alloc(offsets) < size)) {
|
||||||
if (!*heap) {
|
if (UNIV_UNLIKELY(!*heap)) {
|
||||||
*heap = mem_heap_create_func(size * sizeof(ulint),
|
*heap = mem_heap_create_func(size * sizeof(ulint),
|
||||||
MEM_HEAP_DYNAMIC,
|
MEM_HEAP_DYNAMIC,
|
||||||
file, line);
|
file, line);
|
||||||
|
|
Loading…
Add table
Reference in a new issue