-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Not Applicable
-
Storage Engines
-
Nick - 2024-04-30
__wt_lex_compare_short is often a hot function, especially for queries which do repeated seek() operations, as it's called each time we compare a key on a page with the desired key. It is essentially memcmp(), specialized for inputs of up to 9 bytes long.
The current implementation operates byte-by-byte. It would be worth spending some time micro-benchmarking and optimizing this function, perhaps even in architecture-specific ways. For example, we can do multiple comparisons at once, by loading several bytes into an integer, and comparing the integers (though this depends on the system endianness). It may also be better to just call the generic memcmp() directly.
- is related to
-
WT-12361 Revisit __wt_lex_compare_skip impl for arm
- Closed