3 ms·
> Python is considerably slower with musl libc than with glibc I've noticed this years ago too. Interacting with the pg package (PostgreSQL) which has a C dep
by nickjj 5y ago
> Python is considerably slower with musl libc than with glibc
I've noticed this years ago too. Interacting with the pg package (PostgreSQL) which has a C dependency was noticeably slower on Alpine vs Debian when performing common database operations like selecting data. Since around 2018'ish I've been using Debian (Slim) and haven't looked back. Haven't had a single issue.
- tyingq 5y agoIt seems like it's usually down to musl's malloc being slower than glibc's. They are working on a new malloc. https://github.com/richfelker/mallocng-draft https://github.com/richfelker/mallocng-draft
- jrochkind1 5y agoInteresting. I have heard from people anecdotally that ruby is in fact a lot faster on alpine/musl-libc. Can anyone confirm that? If so, I wonder what the difference between python and ruby is. (when they seem fairly similar languages from the outside).
- otabdeveloper4 5y agoThat's by design. Glibc is a huge PITA but it's very carefully engineered for best performance.