num-bigint
num-bigint copied to clipboard
Use inline asm! for x86 DIV on Rust 1.59+
bors try
try
Build succeeded:
While this does improve benchmarks here and in my own programs, one downside is that this asm!
is opaque to LLVM, so it doesn't get a chance to optimize division by a constant (scalar) value into "magic" multiplication.
On further reflection, the measured gains should outweigh theoretical optimization losses.
Maybe someday we could try is_val_statically_known
to detect divisors that might be optimizable.