]> git.lizzy.rs Git - rust.git/commit
std::trie: make lower_bound and upper_bound about 15% faster.
authorHuon Wilson <dbau.pp+github@gmail.com>
Mon, 6 Jan 2014 14:45:10 +0000 (01:45 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Tue, 7 Jan 2014 13:31:24 +0000 (00:31 +1100)
commit7e446af759e86e77a5f4a8e9bc6d6c22072b25ae
tree5dbc7014b5635fb8576bf69e49fd7c45075363be
parent3395f9d6a10aa912ab88de2e8d5b4f7de407413a
std::trie: make lower_bound and upper_bound about 15% faster.

I believe this is mainly due to code-size reduction.

Before:

    test [...]::bench_lower_bound ... bench:       818 ns/iter (+/- 100)
    test [...]::bench_upper_bound ... bench:       939 ns/iter (+/- 34)

After:

    test [...]::bench_lower_bound ... bench:       698 ns/iter (+/- 60)
    test [...]::bench_upper_bound ... bench:       817 ns/iter (+/- 20)
src/libstd/trie.rs