4 ms·
https://github.com/developit/preact-perf https://github.com/developit/preact-perf https://localvoid.github.io/uibench/ https://localvoid.github.io/uibench/ In
by developit 11y ago
https://github.com/developit/preact-perf https://github.com/developit/preact-perf
https://localvoid.github.io/uibench/ https://localvoid.github.io/uibench/
In the second benchmark, Preact is only faster in around half of the tests. However, this benchmark only tests complete top-down re-renders and intentionally triggers synchronous rendering in Preact. In a normal app composed of Components, Preact batches state changes which improves performance considerably.
- localvoid 11y agoAll libraries in uibench have batching, and batching doesn't improve performance, it just prevents from doing unnecessary work during one frame. It is pointless to test performance of different state changes with enabled batching.