Skip to content

[Performance]: Builds on alpine run 5x slower #6065

Closed Answered by xc2
uncaught asked this question in Core
Discussion options

You must be logged in to vote

yea it's as expected - musl's malloc implementation is as 4 to 8 times slower as glibc's.

please always use glibc on performance sensitive sceniros.

alternatively, redirecting malloc to microsoft's mimalloc will significantly help the performance.

i created a repo to show how malloc implentations affect performance: https://github.com/xc2/rspack-stress/blob/main/malloc-bench/malloc-bench.bash

tldr; bench result:

Running case debian
Rspack compiled successfully in 1.67 s

Running case alpine
Rspack compiled successfully in 6.39 s

Running case alpine-mimalloc-v1
Rspack compiled successfully in 1.78 s

Running case alpine-mimalloc-v2
Rspack compiled successfully in 1.70 s

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by uncaught
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Core
Labels
None yet
3 participants