Commit 25729f1c authored by Alex Converse's avatar Alex Converse

Skip the empty symbol in ANS symbol lookup.

There are lots of potential ways to speed up symbol lookup, but this is
faster than what is checked in, and matches what was used in the
benchmark.

Longterm the empty symbol should still be removed.

Change-Id: I2fb9347be578a07ea6f0615c19f50ddd5aace140
parent 5592b699
......@@ -68,7 +68,7 @@ struct rans_dec_sym {
static INLINE void fetch_sym(struct rans_dec_sym *out, const rans_lut cdf,
AnsP10 rem) {
int i = 0;
int i = 1;
// TODO(skal): if critical, could be a binary search.
// Or, better, an O(1) alias-table.
while (rem >= cdf[i]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment