-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-03-16
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
SERVER-120255 optimized bson::getField() in SBE to use strlen() + length comparison + memcmp instead of byte-by-byte strcmp. This delivered significant improvements for realistic field name lengths (73-75% faster for 64-char names, 21-45% for 17-char names), but regressed repeated_path_traversal and coll_scan_complex_predicate benchmarks by ~17-19% (BF-41932, accepted by Product Performance).
The regression occurs because strlen() is called on every BSON field name during iteration — even on misses — to compute the field name length needed by bson::advance(). With short (1-2 char) field names and high miss rates, this is slower than the old byte-by-byte compare that bailed at the first mismatching byte.
- is related to
-
SERVER-120255 Add more scenarios to sbe_get_field_bm, optimize bson::getField()
-
- Closed
-
- related to
-
SERVER-121312 Explore optimized string comparison strategies for bson::getField()
-
- Needs Scheduling
-