logoalt Hacker News

jstimpfleyesterday at 8:36 PM1 replyview on HN

C is not slow compared to C++, that is a strange myth.


Replies

jmalickiyesterday at 9:17 PM

In practice, C means you end up with generic data structures with pointers to what they contain, rather than being inline.

You do see a lot of macro use to deal with this, but that is just primitive, non-typesafe metaprogramming, and it gets unwieldy enough that in practice, you see people add an extra pointer. This is why it gets slower.

show 1 reply