gnzlbg / cargo-asm

cargo subcommand showing the assembly or llvm-ir generated for Rust code
https://github.com/gnzlbg/cargo-asm
Other
1.17k stars 36 forks source link

Make some central functions take target as &str #105

Closed therealprof closed 5 years ago

therealprof commented 5 years ago

This reduces execution time considerably for even the simplest embedded cases (lots of tiny accessor functions to demangle):

e.g. from:

real 0m1.462s user 0m0.942s sys 0m0.089s

to:

real 0m1.021s user 0m0.727s sys 0m0.086s

for time cargo asm --target=thumbv6m-none-eabi --example i2c_scanner

(from the nucleo-f042k6 crate)

Closes #102

Signed-off-by: Daniel Egger daniel@eggers-club.de

gnzlbg commented 5 years ago

Thanks!