about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-01-14 01:37:52 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-01-18 10:46:11 +1100
commit0148055a56953a747362acb78efc8f0865fccc54 (patch)
tree96e09a483fed0fa19382fed63c4355ab72e1f54a /src/rustllvm/RustWrapper.cpp
parentf0c554d0d87bd2c9e33c72d126f506716dd1b5d1 (diff)
downloadrust-0148055a56953a747362acb78efc8f0865fccc54.tar.gz
rust-0148055a56953a747362acb78efc8f0865fccc54.zip
std::trie: use unsafe code to give a 3x speed up to the iterator.
This stores the stack of iterators inline (we have a maximum depth with
`uint` keys), and then uses direct pointer offsetting to manipulate it,
in a blazing fast way:

Before:

    bench_iter_large          ... bench:     43187 ns/iter (+/- 3082)
    bench_iter_small          ... bench:       618 ns/iter (+/- 288)

After:

    bench_iter_large          ... bench:     13497 ns/iter (+/- 1575)
    bench_iter_small          ... bench:       220 ns/iter (+/- 91)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions