Go to file
Homu f2ea30d9f4 Auto merge of #133 - koverstreet:master, r=cuviper
[RFC] Some performance improvements

I added add and subtract methods that take an operand by value, instead of by reference, so they can work in place instead of always allocating new BigInts for the result.

I'd like to hear if anyone knows a better way of doing this, though - with the various wrappers/forwardings doing this for all the operations is going to be a mess and add a ton of boilerplate. I haven't even tried to do a complete job of it yet.

I'm starting to think the sanest thing to do would be to only have in place implements of most of the operations - and have the wrappers clone() if necessary. That way, the only extra work we're doing is a memcpy(), which is a hell of a lot faster than a heap allocation.
2015-12-11 10:13:09 +09:00
.travis Use scripts for compound travis commands 2015-11-18 21:33:07 -08:00
benches Add multiplication/division benchmarks 2015-12-10 12:22:54 -09:00
doc Update repo and doc links 2015-11-12 18:40:13 -08:00
num-macros num-macros: rustc::plugin -> rustc_plugin 2015-12-01 17:40:51 -08:00
src Multiply/divide torture test 2015-12-10 15:28:01 -09:00
.gitignore Update num-macros to Rust master 2015-05-14 10:19:47 -07:00
.travis.yml Fix travis on non-nightly 2015-11-18 22:12:19 -08:00
Cargo.toml Publish num 0.1.28 2015-11-21 17:00:15 -08:00
LICENSE-APACHE Initial seeding from rust repo 2014-09-16 10:35:35 -07:00
LICENSE-MIT Initial seeding from rust repo 2014-09-16 10:35:35 -07:00
README.md Update intros to better reflect the breadth of num 2015-11-21 16:39:00 -08:00

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.

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
num = "0.1"

and this to your crate root:

extern crate num;