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
..
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2026-01-21 10:13:50 -05:00
2023-07-16 19:18:58 -07:00
2025-09-03 13:30:35 -04:00
2026-01-21 10:13:50 -05:00
2025-10-31 18:46:13 -04:00
2025-11-01 17:28:17 -04:00
2025-10-31 18:56:23 -04:00
2025-09-21 08:13:48 -06:00
2025-09-21 08:13:48 -06:00
2023-07-16 19:18:58 -07:00
2023-07-16 19:18:58 -07:00
2023-07-16 19:18:58 -07:00
2025-07-14 15:55:00 -04:00
2023-07-14 20:05:05 -07:00
2026-01-21 10:13:50 -05:00
2023-07-16 19:18:58 -07:00
2026-01-21 10:13:50 -05:00
2025-12-17 20:33:11 -05:00
2024-02-23 16:50:55 -05:00
2023-07-16 19:18:58 -07:00