jorgebucaran / hyperapp

1kB-ish JavaScript framework for building hypertext applications
MIT License
19.04k stars 779 forks source link

Performance and benchmarks? #13

Closed leeoniya closed 7 years ago

leeoniya commented 7 years ago

Hey @jorgebucaran

The docs seem to lack any mention of "blazing fast" or similar :D

Do you have any of the common benchmarks implemented to know where hyperapp fits into either [1] or [2]?

[1] https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts/table.html [2] http://mathieuancelin.github.io/js-repaint-perfs/

jorgebucaran commented 7 years ago

@leeoniya Thanks! I sent a PR to the js-repaint-perfs repo, let's hope to see it merged.

The good news are, benchmarks indicate that HyperApp is on the fast track. Careful examination of the gif seems to favor the following order for this particular test.

Inferno/HyperApp โ†’ Elm/CycleJS+Snabbdom/VueJS โ†’ morphodom

Inferno seems to do slightly better, but both Inferno and HyperApp outmatch Cycle/Vue and morphodom (but not by much). Morphodom is particularly slow though.

2017-02-03 13 55 46

I think even faster than that is domvm, vidom, maybe mithril?

sotojuan commented 7 years ago

The docs seem to lack any mention of "blazing fast" or similar :D

Probably a positive thing. In 2017 sufficient performance is a givenโ€”I care more about ergonomics and fun.

leeoniya commented 7 years ago

2017 sufficient performance is a given

certainly you don't need to be the fastest. but it helps to assure people you're not the slowest either. nothing wrong with objectivity, regardless of what year it is.

mobile performance differences are still enormous between libs. disclaimer: i've got a pretty fast horse in the game, too [1] ;)

[1] https://github.com/leeoniya/domvm

sotojuan commented 7 years ago

I guess I'm just tired of new libraries claiming they're "blazing fast!!111!!!!" and focusing on that instead of other features. I mean IDK, Backbone was fast enough for me ๐Ÿ˜…

leeoniya commented 7 years ago

yeah, the original comment was meant to be tongue-in-cheek for this reason.

nevertheless, the benchmarks are hugely helpful (even if just to catch accidental lib perf regressions). if you can believe it, there are apps out there for which Backbone is grossly insufficient. if you've never had perf issues with Backbone, no one is prying it or jQuery from your hands, heh ๐Ÿ˜†

jorgebucaran commented 7 years ago

Going to close here in favor of #75.

jorgebucaran commented 5 years ago

V2's new patch algorithm (based on Superfine) is signifcantly faster than V1. Here are the benchmark results. To maximize performance, the benchmarked example app makes use of memoization to boost the rendering perf of table rows that are not affected by state changes. This technique will eventually make it into core as described in #721.

Superfine