Skip to content

try reducing codspeed variance - #1082

Merged
provinzkraut merged 5 commits into
msgspec:mainfrom
provinzkraut:codspeed-reduce-allocator-variance
Jun 17, 2026
Merged

provinzkraut merged 5 commits into
msgspec:mainfrom
provinzkraut:codspeed-reduce-allocator-variance

Conversation

@provinzkraut

@provinzkraut provinzkraut commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

Re-ran the benchmarks a couple of times now, and they seem more stable within this branch. Let's see if this also works across branches.

@codspeed

codspeed Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 97.51%

⚡ 4 improved benchmarks
✅ 43 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation test_equality[arm] 147 µs 20.2 µs ×7.3
⚡ Simulation test_equality[amd] 156.9 µs 100.5 µs +56.21%
⚡ Simulation test_encode[amd-json] 1.6 ms 1.4 ms +15.73%
⚡ Simulation test_encode[amd-msgpack] 1.6 ms 1.4 ms +15.54%

Tip

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


Comparing provinzkraut:codspeed-reduce-allocator-variance (aedd97a) with main (978c667)

Open in CodSpeed

@provinzkraut
provinzkraut force-pushed the codspeed-reduce-allocator-variance branch from c5a850d to aedd97a Compare June 17, 2026 12:03
@provinzkraut

Copy link
Copy Markdown
Member Author

@sobolevn using pytest-randomly without a fixed seed was a bad idea 🙃

That introduced a looot of variance in the ordering/sorting tests. Obviously 😅
No idea why I didn't think of that immediately.

@provinzkraut
provinzkraut marked this pull request as ready for review June 17, 2026 12:10
@provinzkraut
provinzkraut added this pull request to the merge queue Jun 17, 2026
Merged via the queue into msgspec:main with commit 8cf7021 Jun 17, 2026
31 of 32 checks passed
@provinzkraut
provinzkraut deleted the codspeed-reduce-allocator-variance branch June 17, 2026 12:13
This was referenced Jun 17, 2026
@ofek

ofek commented Jun 17, 2026

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants