3 ms·
Neat (re: godbolt). But the output is super bloated for Rust -- even with no_std and the panic handler stubbed out. https://godbolt.org/z/nW79G1o71 https://god
by cmrdporcupine 4y ago
Neat (re: godbolt). But the output is super bloated for Rust -- even with no_std and the panic handler stubbed out.
https://godbolt.org/z/nW79G1o71 https://godbolt.org/z/nW79G1o71
Also my old 6502 then 68000 brain never learned to read x86 assembly. :-) I find ARM/Aarch64 easier to grock. I might do this same test on the M1 Mac I have handy here, but fiddle with compiler until I can get an absolutely tiny binary and then compare to C. Some day.
- kibwen 4y agoYour link there is compiling in debug mode, using opt-level=0 (the default), which is why it produces 1800 lines of output. If you do opt-level=3 (which corresponds to `cargo build --release`), it becomes 300 lines of output: https://godbolt.org/z/aYKMne5Wq https://godbolt.org/z/aYKMne5Wq