Skip to content

build: compile the extension for speed instead of size - #79

Merged
jacopoabramo merged 3 commits into
mainfrom
build/optimize-for-speed
Oct 26, 2026
Merged

jacopoabramo merged 3 commits into
mainfrom
build/optimize-for-speed

Conversation

@jacopoabramo

@jacopoabramo jacopoabramo commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner
  • Compile the extension for speed instead of size (NOMINSIZE)
  • Run Ops when CMakeLists.txt changes

The current binary size itself is farly low (less than a MB), and the speed gains are considerable so it's a win in both cases anyway.

@jacopoabramo jacopoabramo added the skip-changelog Not listed in the changelog label Oct 26, 2026
@codspeed

codspeed Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 18.4%

⚡ 17 improved benchmarks
✅ 58 untouched benchmarks
⏩ 1 skipped benchmark1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_write_float_list[l64k-65536] 25 ms 18.4 ms +36.03%
⚡ test_write_float_list[l1k-1024] 434.8 µs 329.2 µs +32.07%
⚡ test_write_int_set[s64k-65536] 36.5 ms 29.1 ms +25.73%
⚡ test_write_int_set[s1k-1024] 624.4 µs 505.7 µs +23.48%
⚡ test_iterate_bounded_list[b64k] 24.7 ms 20.2 ms +22.56%
⚡ test_write_int_dict[d1k-1024] 1.3 ms 1.1 ms +20.64%
⚡ test_iterate_bounded_list[b1k] 434.2 µs 360.4 µs +20.45%
⚡ test_write_int_dict[d64k-65536] 114.1 ms 95.9 ms +19.02%
⚡ test_iterate_bounded_set[bs1k] 537.1 µs 463.9 µs +15.77%
⚡ test_iterate_bounded_set[bs64k] 33.8 ms 29.2 ms +15.44%
⚡ test_write_bounded_set[bs16-16] 28 µs 24.5 µs +14.23%
⚡ test_write_bounded_list[b16-16] 28 µs 24.6 µs +13.74%
⚡ test_read_long_list 42.1 µs 37.4 µs +12.52%
⚡ test_write_int_dict[d16-16] 67.8 µs 60.4 µs +12.3%
⚡ test_read_bounded_list[b16] 32.4 µs 29.1 µs +11.14%
⚡ test_write_int_set[s16-16] 52.4 µs 47.2 µs +10.94%
⚡ test_iterate_bounded_list[b16] 56.8 µs 51.4 µs +10.45%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing build/optimize-for-speed (d167ded) with main (47b081d)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@jacopoabramo jacopoabramo removed the skip-changelog Not listed in the changelog label Oct 26, 2026
@jacopoabramo
jacopoabramo marked this pull request as ready for review October 26, 2026 19:30
@jacopoabramo
jacopoabramo merged commit 04eea4e into main Oct 26, 2026
26 checks passed
@jacopoabramo
jacopoabramo deleted the build/optimize-for-speed branch October 26, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant