-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance improvements #11
Comments
Bad news...
for Snabbdom.createElement('div', null, 'Hello', 13) |
Plan to move to |
Partial lodash experiment :
|
Which is better ? Speed or Weight ? |
I aimed to be dependency free. So what about using is and lodash and produce a dist file which be dependency free with tree shacking ? |
@jvanbruegge Are Snabbdom-pragma performances for Snabbdom and Cyclejs users a priority ? |
I would go for dependency free, as this is affecting the users bundle size. |
I made a brief tests, and seen a tiny difference regarding the lodash implementation ones. The prepack stuffs need to be done after the project use of Only the |
what is the compiled js after prepack? Sorry, I'm on mobile |
On mobile too, I'll take a look after lunch. |
Prepack isnt in love with |
I mean prepack on the file that is using JSX. |
How much does lodash add to the size? |
Following @caridy response :
Snabbdom@2 is not calling h() anymore In fact, we loose in perf due to the switch from for loop to map/reduce. Snabbdom-pragma@1 was 2.76 KB (1.67 KB compressed) I were happy to rewrite Snabbdom-pragma in a more FP way following the Snabbdom contributor advice, but I realise, it was a big loss in all points. Some ES6 features I overuse result to a big transpiled code. Destructuring, rest operator, etc.. For lodash size, I'll need to try, but we can count 3 or 4 functions : flatten, map, reduce, fromPairs (?). |
I dont know how this is calculated, but npm-cost, give me other results : snabbdom-pragma@1 : 3.49 KB |
How do you get those numbers? I'm interested in trying to improve the performance |
I was using a custom implementation using But we should use mafintosh/nanobench |
Do you have any script that i can get and run myself? |
I'm curious to know more about how to measure performance in
op/sec
, to have a comparison between :The text was updated successfully, but these errors were encountered: