388a3132b8
A new Fibonacci benchmark demonstrates the improvement by using both addition and subtraction in each iteration of the loop, like #200. Before: test fib2_100 ... bench: 4,558 ns/iter (+/- 3,357) test fib2_1000 ... bench: 62,575 ns/iter (+/- 5,200) test fib2_10000 ... bench: 2,898,425 ns/iter (+/- 207,973) After: test fib2_100 ... bench: 1,973 ns/iter (+/- 102) test fib2_1000 ... bench: 41,203 ns/iter (+/- 947) test fib2_10000 ... bench: 2,544,272 ns/iter (+/- 45,183) |
||
---|---|---|
.travis | ||
benches | ||
bigint | ||
complex | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.multirust.sh | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
Makefile | ||
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;