logoalt Hacker News

Narishmalast Friday at 9:37 AM2 repliesview on HN

I don't think there's much difference between C and C++ (and Rust, etc...) when it comes to this.


Replies

Joel_Mckaylast Friday at 9:53 AM

There is unless using a llvm compiler that does naive things with code motion.

Rust is typically slowest (often negligible <3%), C++ has better CUDA support, and C can be heavily optimized with inline assembly (very unforgiving to juniors.)

Also, heavily associated with coding style =3

https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Dev...

formerly_provenlast Friday at 11:43 AM

Idiomatic/natural rust tends to be a lot heavier on allocations and also physically moving objects around than the other two.

show 1 reply