Files
Francisco Geiman Thiesen 2887e7432c Fix wrong branch hint and add missing consteval guard in extract_from (#2609)
Two fixes to the ablation logic:

1. Fix incorrect branch hint in capacity_check() overflow detection
   (json_string_builder-inl.h:365): simdjson_likely was used on the
   overflow check `position + upcoming_bytes < position`, but overflow
   is rare so this should be simdjson_unlikely. The comment itself says
   "most of the time there is no overflow". This was causing the branch
   predictor to optimize for the wrong path.

2. Add missing ABLATION_NO_CONSTEVAL guard in extract_from()
   (json_builder.h:332): consteval_to_quoted_escaped was being used
   without an ablation guard, for consistency with all other call sites.

Updated ablation results with both fixes:
| Configuration    | CITM (MB/s) | Impact | Twitter (MB/s) | Impact |
|------------------|-------------|--------|----------------|--------|
| Baseline         | 3001.10     | -      | 5651.89        | -      |
| NO_BRANCH_HINTS  | 2443.67     | -19%   | 4651.78        | -18%   |
| NO_SIMD_ESCAPING | 2904.34     | -3%    | 1403.36        | -75%   |
| NO_CONSTEVAL     | 1796.05     | -40%   | 3542.77        | -37%   |
2026-02-20 14:45:02 -05:00
..