4a8752274c
Using `vec![0; len]` initialization is a little faster. Before: test multiply_0 ... bench: 354 ns/iter (+/- 6) test multiply_1 ... bench: 33,966 ns/iter (+/- 1,508) test multiply_2 ... bench: 3,663,686 ns/iter (+/- 60,880) test divide_0 ... bench: 891 ns/iter (+/- 51) test divide_1 ... bench: 17,316 ns/iter (+/- 387) test divide_2 ... bench: 1,290,378 ns/iter (+/- 73,016) After: test multiply_0 ... bench: 351 ns/iter (+/- 39) test multiply_1 ... bench: 30,827 ns/iter (+/- 680) test multiply_2 ... bench: 3,692,968 ns/iter (+/- 91,146) test divide_0 ... bench: 902 ns/iter (+/- 14) test divide_1 ... bench: 16,981 ns/iter (+/- 102) test divide_2 ... bench: 1,146,367 ns/iter (+/- 60,152) |
||
---|---|---|
.travis | ||
benches | ||
doc | ||
num-macros | ||
src | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
README.md
num
A collection of numeric types and traits for Rust.
This includes new types for big integers, rationals, and complex numbers, new traits for generic programming on numeric properties like `Integer, and generic range iterators.
Usage
Add this to your Cargo.toml
:
[dependencies]
num = "0.1"
and this to your crate root:
extern crate num;