Skip to content

Instantly share code, notes, and snippets.

@evancz
Last active January 16, 2016 06:21
Show Gist options
  • Save evancz/76b619a83a6650a89918 to your computer and use it in GitHub Desktop.
Save evancz/76b619a83a6650a89918 to your computer and use it in GitHub Desktop.

Elm 0.15.1 vs 0.16 on Chrome

Result of running these benchmarks on Chrome 45.0.2454.101

These numbers seem to be pretty consistent on Blink-based browsers (Chrome and Opera) but are more like 20% to 50% improvements on FireFox, Safari, and IE. I am not sure how to explain that, so take these numbers more as an indicator of “Elm is generating faster code across the board” as opposed to “Elm is 10x faster!”

business logic from examples

benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
toggle boxes - 7 actions 28,277 263,424 9.32
benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
type in 5 tasks - 80 actions 2,152 18,573 8.63
do everything - 269 actions 382 1,101 2.88

Syntax

benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
Maybe.withDefault 0 (Just 42) 11,090,226 41,723,518 3.76
Maybe.withDefault 0 Nothing 11,592,266 44,721,889 3.86
isBlack Diamond 11,577,379 35,718,600 3.09
evaluate basicBoolean 3,841,394 17,689,892 4.61
evaluate fancyBoolean 1,999,006 11,576,469 5.71
benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
bind numbers, add them 17,098,659 75,893,573 4.44
tuple destructuring 327,967 73,194,881 223.18
record destructuring 251,713 72,069,854 286.32
benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
1 of 2 fields 189,967 2,970,974 15.64
2 of 2 fields 116,983 2,699,606 23.08
2 of 2 new 361,041 30,316,190 83.97
3 of 5 fields 355,494 1,214,059 3.42
5 of 5 fields 94,264 1,213,257 12.87
5 of 5 new 260,526 28,545,331 109.57
benchmark 0.15.1 ops/sec 0.16 ops/sec comparison
2 of 2 17,003,678 42,816,182 2.52
4 of 10 14,723,307 33,334,457 2.26
@vilterp
Copy link

vilterp commented Nov 19, 2015

holy moly!

@mathieu
Copy link

mathieu commented Nov 21, 2015

Nice !

@Fresheyeball
Copy link

wowzers!

@ismaelga
Copy link

💓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment