Closed Bug 1557738 Opened 6 years ago Closed 6 years ago

[BinAST] Context Huffman tables lookup

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

Attachments

(1 file)

Bug 1552435 puts content in Huffman tables, now we need to be able to look up data in them.

I think that I'm going to start with a linear lookup, which should already be pretty fast for small tables, then determine where to go from there.

Blocks: 1557668
Depends on: 1552435
Priority: -- → P1

This implements lookup in Huffman tables. We try to avoid pulling bits one at a time from the stream (because that's annoying and inefficient and requires abstractions that we don't really have), so we pull about 32 bits at a time and keep them in a bitbuffer. The Huffman table is in charge of looking at
~32 bits and keeping as many as it needs to produce a value.

For the moment, Huffman lookup is O(n), where n is the number of entries, which is very inefficient, but should be simple to test. In the future, we may wish to change representation of Huffman tables to something like
vector (indexed by a 32 bit key) -> vector (indexed by a 8 bit number of bits) -> *T
this would give us bounded time lookup, which should be better.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → dteller
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: