Sabitlenmiş Tweet
Ritesh Ghosh
619 posts

Ritesh Ghosh
@riteshgsh
cloud engineer @BluevectorAI • software engineer • low level systems enthusiast
/dev/null Katılım Ekim 2018
155 Takip Edilen66 Takipçiler
Ritesh Ghosh retweetledi

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

English
Ritesh Ghosh retweetledi
Ritesh Ghosh retweetledi

Wanted this for a long time
Matteo Collina@matteocollina
.@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 👇
English
Ritesh Ghosh retweetledi
Ritesh Ghosh retweetledi
Ritesh Ghosh retweetledi
Ritesh Ghosh retweetledi

@ankiitamalik @astroinrealtime yeah, am libra according to my moon sign
English
Ritesh Ghosh retweetledi
Ritesh Ghosh retweetledi

@riteshgsh Well Done!! I also recommend typeracer, it forces you to correct your mistakes as well 🙂↕️ that's how I practiced
English

@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.
amzn.in/d/hCDKpei
English

@riteshgsh @Jitesh_117 great! time for me to buy a keyboard and practice cuz my laptop keys will cry with the pressure haha
English

@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.
English
















