Add more scenarios to sbe_get_field_bm, optimize bson::getField()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-03-02
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      1. Enhanced SBE getField Benchmark and Optimized Field Lookup

      This PR makes two key improvements:

      1. Completely rewrites the SBE getField benchmark to test various scenarios with a policy-based approach:

      • Document shapes (single field, many fields with target first/last)
      • Value types (small int32, 1KB string)
      • Field name lengths (short, medium, long)
      • Presence patterns (always hit, always miss, 90% hit/10% miss)

      2. Optimizes the getField implementation in values/bson.h:

      • First checks field name length equality & first char
      • Uses memcmp for full string comparison

            Assignee:
            Catalin Sumanaru
            Reporter:
            Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: