perf(bench): add optional mimalloc allocator for sp1-perf (-7.2% fib)#2728
Open
tamirhemo wants to merge 1 commit into
Open
perf(bench): add optional mimalloc allocator for sp1-perf (-7.2% fib)#2728tamirhemo wants to merge 1 commit into
tamirhemo wants to merge 1 commit into
Conversation
4 tasks
5c7edc7 to
86c3f39
Compare
Add mimalloc as an optional feature for sp1-perf. When enabled, replaces glibc malloc with mimalloc's per-thread arenas, reducing lock contention in allocation-heavy paths. Benchmark results (on top of physical-cores change): fib: 28,551ms → 26,504ms (-7.2%) keccak: 35,648ms → 34,845ms (-2.3%) big: 38,228ms → 37,899ms (-0.9%) Usage: cargo build --release -p sp1-perf --features mimalloc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b2a6833 to
31ac2a3
Compare
86c3f39 to
07c5d15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mimallocas optional feature forsp1-perfBenchmark results (on top of physical-cores change)
Usage
Stack
available_parallelism#2727 — E1: rayon defaults to physical cores (-19.8% big)Test plan
cargo build -p sp1-perfworks without mimalloc (no behavior change)cargo build -p sp1-perf --features mimalloccompiles and runs🤖 Generated with Claude Code