Skip to content

Cache parenthesized expression boundaries in the formatter#26344

Merged
charliermarsh merged 8 commits into
mainfrom
charlie/codex-formatter-parentheses-index
Jun 26, 2026
Merged

Cache parenthesized expression boundaries in the formatter#26344
charliermarsh merged 8 commits into
mainfrom
charlie/codex-formatter-parentheses-index

Move formatter trivia to context

cc9584b
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jun 26, 2026 in 0s

Performance Gate Passed

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
✅ 143 untouched benchmarks
⏩ 4 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation formatter[large/dataset.py] 9.2 ms 8.4 ms +9.92%
Simulation formatter[numpy/ctypeslib.py] 1.8 ms 1.7 ms +5.52%
Simulation formatter[pydantic/types.py] 3.5 ms 3.3 ms +5.37%
Simulation formatter[unicode/pypinyin.py] 669.8 µs 638.9 µs +4.85%

Tip

Curious why this is faster? Use the CodSpeed MCP and ask your agent.


Comparing charlie/codex-formatter-parentheses-index (cc9584b) with main (645dca3)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.