
How fast are malloc_size and malloc_usable_size in C? - mpweiher
https://lemire.me/blog/2017/09/15/how-fast-are-malloc_size-and-malloc_usable_size-in-c/
======
wahern

      This matches a performance pattern I have observed: the
      standard C libraries under Linux have very fast memory
      allocation compared to Apple platforms.
    

A couple of releases ago Apple rewrote their C runtime (loader, memory
manager, etc--all the stuff that's needed to bootstrap a typical process) in
C++. Because it didn't yet have suppressions, you got to see the horror show
every time you ran Valgrind.

C++ isn't intrinsically slower than C. But whoever decided to rewrite it in
C++ obviously had some very misguided, overly complicated conceptions about
how to approach things. The smart thing would have been to stick to C, which
makes you think twice (and more) whenever you feel compelled to implement some
grandiose cathedral of abstraction and indirection.

