Open thysultan opened 7 years ago
Instead of
body { color: red }
producing
[ [RULE_START, 1], [SELECTOR, 'body'], [PROPERTY, 'color'], [VALUE, 'red'] [RULE_END] ]
It could instead produce
HEAP = ['body', 'color', 'red'] [ RULE_START, 0, SELECTOR, 0, PROPERTY, 1, VALUE, 2, RULE_END, 2 ]
Where the ints 0,1,2 are memory addresses for the corresponding values in the HEAP.
0,1,2
HEAP
This way you can use a flat Uint32Array typed array for maximum throughput on performance.
Uint32Array
Instead of
producing
It could instead produce
Where the ints
0,1,2
are memory addresses for the corresponding values in theHEAP
.This way you can use a flat
Uint32Array
typed array for maximum throughput on performance.