[Webkit-unassigned] [Bug 111424] Use a bitfield instead of TextPosition to save bytes in CompactToken

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 5 13:54:24 PST 2013


--- Comment #1 from Eric Seidel <eric at webkit.org>  2013-03-05 13:56:49 PST ---
Because the TextPosition is both a column and a line, we can't split 25 bits between both and have any sort of reasonable sized page handling.

So I think we should use an offset instead.  That's slightly more complicated, but will allow us to handle basically any sized page with ease.

The idea would be that each chunk would contain a TextPosition, which is the starting position for that chunk.

Each token would contain a 12 bit line-offset (4095 lines) and a 13 bit column offset (8191 columns).

I could imagine pages breaking past those intra-token offset limits with very long character tokens, but I expect that to be very rare.

Saving 8 bytes storage for every token we process is likely to be worth the code complexity, but again, we'd have to perf test.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list