3 ms·
> Case in point: the new self-hosted compiler is 1.5x faster than the C++ implementation and uses 3x less peak RAM. I am not sure it is comparable: the self-ho
by conaclos 4y ago
> Case in point: the new self-hosted compiler is 1.5x faster than the C++ implementation and uses 3x less peak RAM.
I am not sure it is comparable: the self-hosted compiler uses a different architecture [1].
[1] https://vimeo.com/649009599/7f1fda43ff https://vimeo.com/649009599/7f1fda43ff
- Laremere 4y agoThis is true, but I don't think your point entirely fair either. Zig's design lends itself to writing this style of code. In contrast the usual way(s) C++ is used encourages code that makes these types of optimizations hard/impossible. In practical terms, if you wanted to write fast software, the ergonomics of the language allowing you to use the desired architecture matter a lot. (Also, you're replying to the primary author of Zig and presenter of that talk, if you weren't aware.)
- kaba0 4y agoWhile ergonomics matter, I don’t believe the question is settled at all - for very high performance applications C++ is the answer for a long time to come.