Co-worker was converting a code base from C++ to @rustlang. While in most benchmarks Rust was faster, there was one where C++ outperformed. The fix? Using iterators instead of array indexing. Making the code _higher level_ made it faster!
-
-
I meant to write a blog post about this sort of optimization at some point... It was going to be a part of my talk for
@RustLatamConf :-( -
Yeah, I've seen some examples where I was writing really low level code and it was actually smaller/faster to use high level iterator combinations, vs the old school indexed for loops: https://github.com/nrf-rs/nrf-hal/blob/master/nrf-hal-common/src/spim.rs#L295-L356 …
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.