by est31 · 6y ago · 0 comments
Since then, all algorithms in compiler-rt have been ported to Rust and live in the compiler-builtins crate. This [1] is the source code file for unsigned division. The actual logic is inside a macro and used to implement both 128 bit division in terms of 64 bit numbers and 64 bit division in terms of 32 bit numbers.
I wonder if similar optimizations can be done to that code.
[1]: https://github.com/rust-lang/rust/pull/38482
[0]: https://github.com/rust-lang/compiler-builtins/blob/master/s...
I will try to implement the same optimizations in Rust in the upcoming weeks
UPD And we opened an issue :) https://github.com/rust-lang/compiler-builtins/issues/368