]> git.lizzy.rs Git - rust.git/commit
Replace old pow_with_uint with the new pow func
authorFlavio Percoco <flaper87@gmail.com>
Sat, 18 Jan 2014 17:10:17 +0000 (18:10 +0100)
committerFlavio Percoco <flaper87@gmail.com>
Sat, 18 Jan 2014 19:17:12 +0000 (20:17 +0100)
commit3830a3b4f2559165a89847320d277ef827dd1da9
treeea47f8d1d18f2f5f8c8b8b058e1b07862a0f3230
parentaaf8ba7c51011570e7a6bb350345c23378c4152c
Replace old pow_with_uint with the new pow func

There was an old and barely used implementation of pow, which expected
both parameters to be uint and required more traits to be implemented.
Since a new implementation for `pow` landed, I'm proposing to remove
this old impl in favor of the new one.

The benchmark shows that the new implementation is faster than the one
being removed:

test num::bench::bench_pow_function               ..bench:      9429 ns/iter (+/- 2055)
test num::bench::bench_pow_with_uint_function     ...bench:     28476 ns/iter (+/- 2202)
src/libextra/json.rs
src/libstd/num/mod.rs
src/libstd/num/strconv.rs