3 ms·
Caching is only amortizing if the exact same computation is repeated exactly. And even then, the first full computation is slowed down by a failed cache lookup
by gmueckl 4y ago
Caching is only amortizing if the exact same computation is repeated exactly. And even then, the first full computation is slowed down by a failed cache lookup at the beginning and all code paths that can lead to cache invalidation now have to test for that and trigger it.
- shadowgovt 4y agoNone of these facts imply that either CSS lookup cannot be sped up by caching or XUL didn't already have those concerns. And for something like the browser chrome, the cache could even be serialized during compilation and loaded in to prime it when Firefox launches. It's possible to build a slow CSS engine and it's possible to build a fast CSS engine.