aesthetic-suite / framework

🎨 Aesthetic is an end-to-end multi-platform styling framework that offers a strict design system, robust atomic CSS-in-JS engine, a structural style sheet specification (SSS), a low-runtime solution, and much more!
https://aestheticsuite.dev
MIT License
203 stars 5 forks source link

internal: Rework atomic cache. #125

Closed milesj closed 4 years ago

milesj commented 4 years ago

Summary

The previous attempted to match based on a cached item, which was complicated to write correctly. The new approach generates a unique key based on the options. This somehow boosted block parsing...

parseAsBlock() x 11,667 ops/sec ±3.56% (85 runs sampled)
parseAsDeclaration() x 11,560 ops/sec ±12.62% (82 runs sampled)
Fastest is parseAsBlock()

Screenshots

Checklist