krausest / js-framework-benchmark

A comparison of the performance of a few popular javascript frameworks
https://krausest.github.io/js-framework-benchmark/
Apache License 2.0
6.58k stars 814 forks source link

VanillaJS-3 implementation #1669

Closed mksunny1 closed 1 month ago

mksunny1 commented 1 month ago

I still attempted an implementation that was faster for creating 1K rows. I could not go faster here. However, I found consistent gains in other areas.

Screenshot 2024-05-10 at 13 55 50 Screenshot 2024-05-10 at 13 56 08 Screenshot 2024-05-10 at 13 56 16 Screenshot 2024-05-10 at 13 56 24
leeoniya commented 1 month ago

probably you should test against vanillajs-lite, which is much faster than the others.

https://github.com/krausest/js-framework-benchmark/pull/1666

mksunny1 commented 1 month ago

@leeoniya not exactly. Have you seen the results preview? Also this is a more fair comparison because lite does not bother with managing data. I like that also, but I wanted to align with the behavior of all the other implementations.

krausest commented 1 month ago

There was a conflict. I resolved it using this version. I hope to publish results for the PR tomorrow.

krausest commented 1 month ago

Results are up and it looks good for vanillajs-3 and vanillajs-lite. I guess there's too much vanilla now and I'll retire the others.

mksunny1 commented 1 month ago

Wow, this is amazing. The earlier implementations are great for reference, history, and variety. VanillaJS-3 is mostly syntax sugar for VanillaJS with some purposeful performance tweaks.

mksunny1 commented 1 month ago

I am adding async and defer attributes to the script tag (to improve first paint time) and minor changes to the script file. Just cleaning up the code...

mksunny1 commented 1 month ago

First-paint time suffered after adding the attributes. I will complete my experimentation and push any useful changes. I want to ask but I think it may be silly to actually ask if you measure the time for the initial script run to complete. I am guessing the answer is 'yes'.