in 2019 a researcher at Microsoft wrote a paper called "Free List Sharding in Action" and proved that malloc has been slow this whole time
he built a drop-in replacement called 'mimalloc' and published the numbers
you have been using malloc since you started writing C
it works, it is fine, and it is leaving performance on the table
glibc malloc was designed to be general purpose across every possible allocation pattern that generality has a cost
it uses a single global free list per size class, protected by a lock
under any real multithreaded workload every thread is contending on the same lock
the fix is simple instead of one big free list per size class, give every 64KiB page its own free list each page also gets two separate lists: one for thread-local frees, one for frees coming from other threads
cross-thread frees become a single atomic compare-and-swap with no lock thread-local allocation never touches a lock at all
on the larson server benchmark mimalloc is 2.5x faster than tcmalloc and jemalloc under heavy multithreaded workloads on Linux it runs 5.3x faster than glibc malloc with 50% less resident memory
it is used in Death Stranding, Unreal Engine, NoGIL CPython 3.13, and Microsoft Bing Redis ships jemalloc by default but mimalloc benchmarks faster than jemalloc across most workloads
the fast path in the source is 7 instructions on x64 with a single conditional the comment in the source file says exactly this
This indie dev spent 1,400+ days building his game, Tangy TD, completely from scratch in C++.
Seeing him and his wife react after the game earned $250,000 in its first week after launch is honestly beautiful.
.@nodejs has always been about I/O. Streams, buffers, sockets, files. But there's a gap that has bugged me for years: you can't virtualize the filesystem.
You can't import a module that only exists in memory. You can't bundle assets into a Single Executable without patching half the standard library.
That changes now 👇
@ankiitamalik@Jitesh_117 Definitely, I'd say go with a mechanical one, the feedback it gives is so encouraging. You can go for Redragon Kumara K552, which isn't that expensive and is a good starting point for mechanical keyboards.
https://t.co/q7rJhxKR3M
@ankiitamalik I was in your shoes a couple of years ago. As I practiced I saw my speed increase and that got me hooked up, aiming for more wpm with better accuracy. Wanna reach heights like @Jitesh_117.