about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <mail@carlanton.se>2014-01-12 12:51:16 +0100
committerCarl-Anton Ingmarsson <mail@carlanton.se>2014-01-12 20:25:57 +0100
commite52f7c9239a0a523c04651f5eba3cad6f15fa217 (patch)
tree11dac55bdaccd97c218d4fdbe734f24a83f9cb7a /src/rustllvm/RustWrapper.cpp
parent1130886138f1dc6285ac2011c6bcabefd564bb7d (diff)
downloadrust-e52f7c9239a0a523c04651f5eba3cad6f15fa217.tar.gz
rust-e52f7c9239a0a523c04651f5eba3cad6f15fa217.zip
ebml::extra: Optimize reader::vuint_at()
Use a lookup table, SHIFT_MASK_TABLE, that for every possible four
bit prefix holds the number of times the value should be right shifted and what
the right shifted value should be masked with. This way we can get rid of the
branches which in my testing gives approximately a 2x speedup.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions