Hacker News new | ask | show | jobs
by adgjlsfhk1 1568 days ago
I think a lot of it comes down to language. Summer languages (e.g. python, Matlab, R), performance engineering is a constant fight against an interpreter that is painful. other languages (e.g. C) make it tedious to write fast code because you lack higher level features.
2 comments

D is the closest thing to a "I write generic code which is then optimal for all the situations I can think of" language that I have found so far.

Writing a type that automatically becomes SOA vs. AOS is relatively easy in D, almost impossible in C i.e. please stop writing "fast" code in C.

> Writing a type that automatically becomes SOA vs. AOS is relatively easy in D

There's a library (which I haven't tried out) for doing this in C++20: https://github.com/celtera/ahsohtoa

(The author is an HN regular, jcelerier.)

D is nice. I find Nim even nicer (the static introspection is more complete, and syntactic chatter/noise is lower). https://nim-lang.org/

Several people have done the entity component system (ECS) thing.

"Summer languages"?