4 ms·
I agree that it would be more informative to stress-test using a more real-world use case, I was just in a hurry and used the render benchmark from Mithril.js.
by daliwali 11y ago
I agree that it would be more informative to stress-test using a more real-world use case, I was just in a hurry and used the render benchmark from Mithril.js.
however I think that any benchmark may be skewed to favor a particular implementation. for example, Simulacra.js doesn't batch updates and render asynchronously, it's purely synchronous, so one could set up an artificial benchmark to thrash the DOM by setting different values over and over again in the same tick.
also I haven't yet committed the benchmark I used in git, will do later so that people can reproduce it.
- leeoniya 11y agothis is correct, and Mithril's docs also point this out. domvm uses rAF internally to debounce changes but it can be toggled off (and IS toggled off [1]) for perf tests to make it 100% synchronous as well (via domvm.useRaf = false). would be very interested to see Simulacra's perf in those, when ready. thanks! [1] https://github.com/leeoniya/domvm/blob/master/test/bench/dbmonster/index.html#L21 https://github.com/leeoniya/domvm/blob/master/test/bench/dbm...
- daliwali 11y agoI added a benchmark folder: https://github.com/0x8890/simulacra/tree/master/benchmark https://github.com/0x8890/simulacra/tree/master/benchmark cheers!