Skip to content

Perf/dlmalloc guest allocator - #869

Open
jotabulacios wants to merge 15 commits into
mainfrom
perf/dlmalloc-guest-allocator
Open

Perf/dlmalloc guest allocator#869
jotabulacios wants to merge 15 commits into
mainfrom
perf/dlmalloc-guest-allocator

Conversation

@jotabulacios

@jotabulacios jotabulacios commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

The guest allocator moves from embedded-alloc's TLSF heap to dlmalloc, with TLSF kept one
flag away (tlsf-alloc) for fallback. dlmalloc sits on a bump provider that hands it
page-aligned chunks of the guest heap, so it still reuses freed memory — no OOM — while
each alloc and free costs fewer guest instructions than TLSF.

Isolated A/B on the same tree, only the feature differs: guest cycles drop 11.2% on a
10-transfer ethrex block (1,702,365 → 1,511,225) and 13.1% on a 20-transfer one
(3,915,738 → 3,404,649). In the guest profile the allocator goes from 24.4% of cycles to
9.5%.

@diegokingston

Copy link
Copy Markdown
Collaborator

/bench

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Benchmark — real block (ethrex_mainnet_25368371.bin) (median of 3)

continuations · epoch 2^22 · 12 epochs

Metric main PR Δ
Peak heap 51856 MB 53205 MB +1349 MB (+2.6%) ⚪
Prove time 159.217s 155.437s -3.780s (-2.4%) ⚪

✅ No significant change.

Prove-time spread 3.0% (155.437s / 153.306s / 157.933s)

Commit: 590c340 · Baseline: cached · Runner: self-hosted bench

@diegokingston

Copy link
Copy Markdown
Collaborator

/bench

@jotabulacios
jotabulacios marked this pull request as ready for review July 29, 2026 13:51
@MauroToscano

Copy link
Copy Markdown
Contributor

/bench

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.

3 participants