Optimization: a Stack/Heap approach
- Dominant language
- No language data
- Stars
- 250
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Instead of
```css
body {
color: red
}
```
producing
```js
[
[RULE_START, 1],
[SELECTOR, 'body'],
[PROPERTY, 'color'],
[VALUE, 'red']
[RULE_END]
]
```
It could instead produce
```js
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`.
This way you can use a flat `Uint32Array` typed array for maximum throughput on performance.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or implementation entry points are named. Start by reviewing the proposed HEAP and flat Uint32Array representations and the 50-comment discussion; completion requires an agreed design and a documented or implemented format that addresses the stated throughput goal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100