News for hackers. Stuff that matters.
Re:Why is C slower than Bolin? by flohofwoe on Sunday August 28, 2022 @06:58AM (#32627366)
Ignoring calling out into badly implemented external functions (like stdlib stuff), solving the same problem in any statically typed and compiled systems programming language should pretty much result in the same machine code output, any remaining differences are down to the compiler implementation, not the programming language.

One of the things that actually can make a difference is different rules for pointer aliasing so that the compiler isn't forced to go through memory in some cases, but as Rust has shown, fixing this on the language level doesn't seem to make all that much of a difference in real world performance.

Re:Why is C slower than Bolin? by mustache_kimono on Sunday August 28, 2022 @08:07AM (#32627759)
> but as Rust has shown, fixing this on the language level doesn't seem to make all that much of a difference in real world performance.

AFAIK, for now, Rust's mutable no alias is only used at function parameters, so, for now, its use is pretty limited.

Re:Why is C slower than Bolin? by fyrn- on Sunday August 28, 2022 @07:22AM (#32627479)
In rust's case part of that is that LLVM is very C optimized. It's not great at taking advantage of the more strict rules of rust yet. It is getting better though.