Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slimmify BTree by replacing its internal Node type, which previously……
…held three separately allocated `Vec`s, with a manually allocated buffer. Additionally, restructure the node and stack interfaces to be safer and require fewer bounds checks. Before: test btree::map::bench::find_rand_100 ... bench: 35 ns/iter (+/- 2) test btree::map::bench::find_rand_10_000 ... bench: 88 ns/iter (+/- 3) test btree::map::bench::find_seq_100 ... bench: 36 ns/iter (+/- 1) test btree::map::bench::find_seq_10_000 ... bench: 62 ns/iter (+/- 0) test btree::map::bench::insert_rand_100 ... bench: 157 ns/iter (+/- 8) test btree::map::bench::insert_rand_10_000 ... bench: 413 ns/iter (+/- 8) test btree::map::bench::insert_seq_100 ... bench: 272 ns/iter (+/- 10) test btree::map::bench::insert_seq_10_000 ... bench: 369 ns/iter (+/- 19) test btree::map::bench::iter_1000 ... bench: 19049 ns/iter (+/- 740) test btree::map::bench::iter_100000 ... bench: 1916737 ns/iter (+/- 102250) test btree::map::bench::iter_20 ... bench: 424 ns/iter (+/- 40) After: test btree::map::bench::find_rand_100 ... bench: 9 ns/iter (+/- 1) test btree::map::bench::find_rand_10_000 ... bench: 8 ns/iter (+/- 0) test btree::map::bench::find_seq_100 ... bench: 7 ns/iter (+/- 0) test btree::map::bench::find_seq_10_000 ... bench: 8 ns/iter (+/- 0) test btree::map::bench::insert_rand_100 ... bench: 136 ns/iter (+/- 5) test btree::map::bench::insert_rand_10_000 ... bench: 380 ns/iter (+/- 34) test btree::map::bench::insert_seq_100 ... bench: 255 ns/iter (+/- 8) test btree::map::bench::insert_seq_10_000 ... bench: 364 ns/iter (+/- 10) test btree::map::bench::iter_1000 ... bench: 19112 ns/iter (+/- 837) test btree::map::bench::iter_100000 ... bench: 1911961 ns/iter (+/- 33069) test btree::map::bench::iter_20 ... bench: 453 ns/iter (+/- 37)
- Loading branch information
130fb08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from Gankro
at gereeter@130fb08
130fb08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging gereeter/rust/slimmer-btree-node = 130fb08 into auto
130fb08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gereeter/rust/slimmer-btree-node = 130fb08 merged ok, testing candidate = a592124
130fb08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/2660
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/2655
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2656
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2647
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2646
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2650
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2642
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2642
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2307
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2304
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/1146
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/1140
130fb08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = a592124