I used to believe this seemingly obvious truism, but it turns out that it's not at all easy to rewrite your entire architecture when it's slow by design, especially if the design flaws are baked into the public API.https://twitter.com/BrianGoetz/status/1246054109762990087 …
-
Show this thread
-
Part of the problem is that the very paradigms we use are mostly slow by design. OOP, RAII, FRP, ARC, GC… All of these require masses of runtime heap allocations and deallocations, and actively work against the CPU cache.
3 replies 1 retweet 33 likesShow this thread -
It's almost impossible to write fast software using the idiomatic programming patterns encouraged by most mainstream languages. Even "low-level" systems languages like C++ have adopted patterns that fight against the CPU and compiler's ability to optimize your code.
1 reply 2 retweets 31 likesShow this thread -
Basically the only folks who still write fast software are AAA game engine developers, and they mostly use a very limited subset of C++ consisting of flat arrays (for cache coherence) and small structs, with arena-based custom allocators to avoid malloc/free inside hot paths.
7 replies 8 retweets 67 likesShow this thread -
Replying to @nicklockwood
Even in the game case it's a small (in the LOC sense, compared to the whole engine, or more extremely, the whole game) core part of the engine. It's not just AAA games. There's heavily optimized parts of crucial libraries (e.g. compression, hashing, video).
1 reply 0 retweets 0 likes -
Replying to @AndresFreundTec @nicklockwood
Databases (RDBMSs to some degree, but vectorized column stores for analytics much more), for example. But plenty other code too.
1 reply 0 retweets 0 likes
I can't find the paper I was thinking of just now, but https://ir.cwi.nl/pub/27565/27565.pdf … touches a bit on it.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.