4 ms·
I've written my share of systems level C++ in performance constrained environments professionally (gamedev, embedded systems). Never touched goto, alloca and b
by vvanders 6y ago
I've written my share of systems level C++ in performance constrained environments professionally (gamedev, embedded systems).
Never touched goto, alloca and branching usually stayed out of hot code through DOD approaches. Not really sure I agree with the conclusion.
Alternatively they didn't talk at all about aliasing/restrict which is one really neat area of Rust because &mut guarantees one of the key aliasing constraints.
- creata 6y agoIsn't it still unable to actually make those aliasing optimizations because LLVM doesn't compile them correctly? https://github.com/rust-lang/rust/issues/54878 https://github.com/rust-lang/rust/issues/54878
- klyrs 6y agoI've used goto a handful of times over my 20 year professional history with c and c++. A few were used for simplifying cleanup code (actually this is quite common in c, less so in c++); a few were used in weird state machines and were accompanied by a page of documentation.