ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2026-08-17, QE 2026-08-31, QE 2026-09-15, QE 2026-09-28, QE 2026-10-12
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use a single int8_t lookup table to encode size information for BSONElement values.

      The encoding is as follows:

      • positive value = fixed size
      • negative = variable with that fixed part
      • zero = slow path for regex and invalid types.

      The conditional branching for negative and zero values can now be served from a single table load, which allows to remove the previous bitshift operation and the 32 bit masking.

      The change also makes MinKey and MaxKey element use the fast path instead of taking the slow path into `computeRegexSize()`.

      Invalid types still take the slow path into `computeRegexSize()` and uassert with errorĀ 10320.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: