Use is_val_statically_known to optimize pow

In the dynamic exponent case, it's preferred to not increase code size,
so use solely the loop-based implementation there.
This shows about 4% penalty in the variable exponent benchmarks
on x86_64.
This commit is contained in:
Mikhail Zabaluev
2024-07-12 22:54:08 +03:00
parent 1faa1018c7
commit 2f23534352
3 changed files with 125 additions and 92 deletions

View File

@@ -170,6 +170,7 @@
#![feature(internal_impls_macro)]
#![feature(ip)]
#![feature(is_ascii_octdigit)]
#![feature(is_val_statically_known)]
#![feature(isqrt)]
#![feature(link_cfg)]
#![feature(offset_of_enum)]