diff --git a/README.md b/README.md index 5f7eae4..f671675 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ elm-optimize-level-2 Main.elm will generate an `elm.js` file. -The only configurable option is what to name the generated js file. +The first configurable option is what to name the generated js file. ``` elm-optimize-level-2 Main.elm --output app.js @@ -46,6 +46,13 @@ elm-optimize-level-2 Main.elm --output app.js **Another Note** — Before deploying your app, you should also minify it and gzip it. `elm-optimize-level-2` does not do that for you. [Check out this doc for a recommended setup.](notes/minification.md) +## The `--optimize-speed` flag + +You can also provide `--optimize-speed` (`--O3`) to `elm-optimize-level-2`, which will attempt to generate even faster code at the expense of asset size. + +If you enable this option you may experience a ~5% bigger js file, but with significantly faster record updates. + + ## What's actually happening? This might seem a bit like magic. :sparkles: diff --git a/data/current.md b/data/current.md index 6a7fec2..699f365 100644 --- a/data/current.md +++ b/data/current.md @@ -10,4 +10,12 @@ Namely that We track both benchmark performance and minified+gzipped asset size. -[Here are the general results](results.current.md)! +[Here are the general results](current/results.current.md)! + + +Also, every time we do a release, we run the benchmark using the old transformations and again using the new ones. + +This is so we can get comparable results. So, compare `current/results.md` to `current/results.previous.v1.md`. + +We also run the benchmark suite with `--O3` enabled, which is the option that sacrifices asset size for speed. + diff --git a/data/current/results.md b/data/current/results.md new file mode 100644 index 0000000..b57d225 --- /dev/null +++ b/data/current/results.md @@ -0,0 +1,216 @@ +# Benchmark results + +## Elm Core asset overview + + .keep 0kb + elm.opt.js 165kb + elm.opt.min.js 32.6kb + elm.opt.min.js.gz 11.1kb + elm.opt.transformed.js 227.4kb + elm.opt.transformed.min.js 31.3kb + elm.opt.transformed.min.js.gz 11kb + +## Elm CSS - Realworld asset overview + + .keep 0kb + elm.opt.js 253kb + elm.opt.min.js 47.3kb + elm.opt.min.js.gz 14.7kb + elm.opt.transformed.js 346.6kb + elm.opt.transformed.min.js 46.3kb + elm.opt.transformed.min.js.gz 14.7kb + +## Html asset overview + + .keep 0kb + elm.opt.js 142.5kb + elm.opt.min.js 21.8kb + elm.opt.min.js.gz 7.3kb + elm.opt.transformed.js 199.7kb + elm.opt.transformed.min.js 20.9kb + elm.opt.transformed.min.js.gz 7.2kb + +## Elm UI asset overview + + .keep 0kb + elm.opt.js 352.3kb + elm.opt.min.js 72.4kb + elm.opt.min.js.gz 20.1kb + elm.opt.transformed.js 446.7kb + elm.opt.transformed.min.js 69.6kb + elm.opt.transformed.min.js.gz 20kb + +## Elm Markdown asset overview + + .keep 0kb + elm.opt.js 404.9kb + elm.opt.min.js 81kb + elm.opt.min.js.gz 25.1kb + elm.opt.transformed.js 515.5kb + elm.opt.transformed.min.js 77.6kb + elm.opt.transformed.min.js.gz 24.9kb + + +## Elm Core + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| sum 300 list of custom types | |safari | 1,083,357| | +| sum 300 list of custom types |final |safari | 1,412,156| (130%) | +| sum 300 list of custom types | |firefox | 210,260| | +| sum 300 list of custom types |final |firefox | 254,747| (121%) | +| sum 300 list of custom types | |chrome | 987,517| | +| sum 300 list of custom types |final |chrome | 1,221,647| (124%) | +| Update single record | |safari | 294,420| | +| Update single record |final |safari | 295,181| (100%) | +| Update single record | |firefox | 495,821| | +| Update single record |final |firefox | 500,026| (101%) | +| Update single record | |chrome | 539,230| | +| Update single record |final |chrome | 553,466| (103%) | +| Update single record via inlining creation in elm| |safari | 48,792,581| | +| Update single record via inlining creation in elm|final |safari | 50,927,583| (104%) | +| Update single record via inlining creation in elm| |firefox | 69,561,411| | +| Update single record via inlining creation in elm|final |firefox | 67,787,901| (97%) | +| Update single record via inlining creation in elm| |chrome | 120,501,794| | +| Update single record via inlining creation in elm|final |chrome | 114,150,043| (95%) | +| Return list literal | |safari | 7,384,740| | +| Return list literal |final |safari | 8,068,836| (109%) | +| Return list literal | |firefox | 7,276,292| | +| Return list literal |final |firefox | 7,717,271| (106%) | +| Return list literal | |chrome | 18,483,857| | +| Return list literal |final |chrome | 18,590,104| (101%) | +| Dict.fromList | |safari | 802,477| | +| Dict.fromList |final |safari | 940,319| (117%) | +| Dict.fromList | |firefox | 382,828| | +| Dict.fromList |final |firefox | 521,839| (136%) | +| Dict.fromList | |chrome | 800,441| | +| Dict.fromList |final |chrome | 1,228,943| (154%) | +| Dict.get | |safari | 9,664,396| | +| Dict.get |final |safari | 11,336,126| (117%) | +| Dict.get | |firefox | 5,193,891| | +| Dict.get |final |firefox | 6,270,568| (121%) | +| Dict.get | |chrome | 15,561,336| | +| Dict.get |final |chrome | 15,570,514| (100%) | +| Dict.insert | |safari | 5,928,219| | +| Dict.insert |final |safari | 6,518,825| (110%) | +| Dict.insert | |firefox | 3,184,575| | +| Dict.insert |final |firefox | 3,988,681| (125%) | +| Dict.insert | |chrome | 8,342,925| | +| Dict.insert |final |chrome | 10,005,229| (120%) | +| Dict.toList | |safari | 3,799,005| | +| Dict.toList |final |safari | 5,263,097| (139%) | +| Dict.toList | |firefox | 1,973,777| | +| Dict.toList |final |firefox | 4,074,500| (206%) | +| Dict.toList | |chrome | 4,310,787| | +| Dict.toList |final |chrome | 9,564,051| (222%) | +| Dict.size | |safari | 13,136,835| | +| Dict.size |final |safari | 20,244,143| (154%) | +| Dict.size | |firefox | 6,518,077| | +| Dict.size |final |firefox | 8,724,941| (134%) | +| Dict.size | |chrome | 23,525,834| | +| Dict.size |final |chrome | 17,149,972| (73%) | +| Calling a function with a 6 record arg | |safari | 76,138,189| | +| Calling a function with a 6 record arg |final |safari | 79,331,317| (104%) | +| Calling a function with a 6 record arg | |firefox | 71,489,136| | +| Calling a function with a 6 record arg |final |firefox | 72,287,907| (101%) | +| Calling a function with a 6 record arg | |chrome | 142,072,200| | +| Calling a function with a 6 record arg |final |chrome | 142,220,027| (100%) | +| Calling a function with 6 argsl | |safari | 47,220,024| | +| Calling a function with 6 argsl |final |safari | 79,979,565| (169%) | +| Calling a function with 6 argsl | |firefox | 58,532,175| | +| Calling a function with 6 argsl |final |firefox | 73,351,231| (125%) | +| Calling a function with 6 argsl | |chrome | 140,157,638| | +| Calling a function with 6 argsl |final |chrome | 144,466,535| (103%) | +| Encode string | |safari | 5,353,018| | +| Encode string |final |safari | 5,473,917| (102%) | +| Encode string | |firefox | 6,450,814| | +| Encode string |final |firefox | 6,960,455| (108%) | +| Encode string | |chrome | 5,254,851| | +| Encode string |final |chrome | 5,317,408| (101%) | +| Encode Object | |safari | 929,017| | +| Encode Object |final |safari | 1,067,554| (115%) | +| Encode Object | |firefox | 911,208| | +| Encode Object |final |firefox | 1,064,339| (117%) | +| Encode Object | |chrome | 1,000,668| | +| Encode Object |final |chrome | 1,155,044| (115%) | +| Equals literal int | |safari | 74,731,963| | +| Equals literal int |final |safari | 78,528,441| (105%) | +| Equals literal int | |firefox | 76,534,270| | +| Equals literal int |final |firefox | 100,083,968| (131%) | +| Equals literal int | |chrome | 147,735,063| | +| Equals literal int |final |chrome | 148,576,966| (101%) | +| Equals, no literal | |safari | 37,476,017| | +| Equals, no literal |final |safari | 36,292,032| (97%) | +| Equals, no literal | |firefox | 38,434,375| | +| Equals, no literal |final |firefox | 43,075,063| (112%) | +| Equals, no literal | |chrome | 147,162,653| | +| Equals, no literal |final |chrome | 147,424,639| (100%) | + + +## Elm CSS - Realworld + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| Search form inspired by vy.no | |safari | 2,660| | +| Search form inspired by vy.no |final |safari | 3,498| (132%) | +| Search form inspired by vy.no | |firefox | 2,237| | +| Search form inspired by vy.no |final |firefox | 2,587| (116%) | +| Search form inspired by vy.no | |chrome | 4,857| | +| Search form inspired by vy.no |final |chrome | 5,857| (121%) | + + +## Html + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested html tree | |safari | 51,031| | +| create a 4 level nested html tree |final |safari | 73,785| (145%) | +| create a 4 level nested html tree | |firefox | 30,165| | +| create a 4 level nested html tree |final |firefox | 49,501| (164%) | +| create a 4 level nested html tree | |chrome | 49,431| | +| create a 4 level nested html tree |final |chrome | 128,869| (261%) | + + +## Elm UI + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested Elm UI tree | |safari | 3,941| | +| create a 4 level nested Elm UI tree |final |safari | 4,587| (116%) | +| create a 4 level nested Elm UI tree | |firefox | 2,778| | +| create a 4 level nested Elm UI tree |final |firefox | 3,555| (128%) | +| create a 4 level nested Elm UI tree | |chrome | 5,178| | +| create a 4 level nested Elm UI tree |final |chrome | 6,806| (131%) | + + +## Elm Markdown + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| just a heading | |safari | 82,688| | +| just a heading |final |safari | 107,889| (130%) | +| just a heading | |firefox | 56,612| | +| just a heading |final |firefox | 76,870| (136%) | +| just a heading | |chrome | 90,830| | +| just a heading |final |chrome | 142,690| (157%) | +| elm-explorations/markdown readme | |safari | 23,752| | +| elm-explorations/markdown readme |final |safari | 30,860| (130%) | +| elm-explorations/markdown readme | |firefox | 15,454| | +| elm-explorations/markdown readme |final |firefox | 20,493| (133%) | +| elm-explorations/markdown readme | |chrome | 24,675| | +| elm-explorations/markdown readme |final |chrome | 40,093| (162%) | +| withHeadingsAndLists | |safari | 3,585| | +| withHeadingsAndLists |final |safari | 4,834| (135%) | +| withHeadingsAndLists | |firefox | 2,533| | +| withHeadingsAndLists |final |firefox | 3,424| (135%) | +| withHeadingsAndLists | |chrome | 3,953| | +| withHeadingsAndLists |final |chrome | 6,305| (159%) | +| withHeadingsAndListsAndHtml | |safari | 2,388| | +| withHeadingsAndListsAndHtml |final |safari | 3,293| (138%) | +| withHeadingsAndListsAndHtml | |firefox | 1,721| | +| withHeadingsAndListsAndHtml |final |firefox | 2,327| (135%) | +| withHeadingsAndListsAndHtml | |chrome | 2,693| | +| withHeadingsAndListsAndHtml |final |chrome | 4,173| (155%) | + + + diff --git a/data/current/results.o3.md b/data/current/results.o3.md new file mode 100644 index 0000000..b39e5d3 --- /dev/null +++ b/data/current/results.o3.md @@ -0,0 +1,216 @@ +# Benchmark results + +## Elm Core asset overview + + .keep 0kb + elm.opt.js 165kb + elm.opt.min.js 32.6kb + elm.opt.min.js.gz 11.1kb + elm.opt.transformed.js 228.9kb + elm.opt.transformed.min.js 31.9kb + elm.opt.transformed.min.js.gz 11.1kb + +## Elm CSS - Realworld asset overview + + .keep 0kb + elm.opt.js 253kb + elm.opt.min.js 47.3kb + elm.opt.min.js.gz 14.7kb + elm.opt.transformed.js 347.2kb + elm.opt.transformed.min.js 46.5kb + elm.opt.transformed.min.js.gz 14.8kb + +## Html asset overview + + .keep 0kb + elm.opt.js 142.5kb + elm.opt.min.js 21.8kb + elm.opt.min.js.gz 7.3kb + elm.opt.transformed.js 199.7kb + elm.opt.transformed.min.js 20.9kb + elm.opt.transformed.min.js.gz 7.2kb + +## Elm UI asset overview + + .keep 0kb + elm.opt.js 352.3kb + elm.opt.min.js 72.4kb + elm.opt.min.js.gz 20.1kb + elm.opt.transformed.js 450.7kb + elm.opt.transformed.min.js 72.7kb + elm.opt.transformed.min.js.gz 20.7kb + +## Elm Markdown asset overview + + .keep 0kb + elm.opt.js 404.9kb + elm.opt.min.js 81kb + elm.opt.min.js.gz 25.1kb + elm.opt.transformed.js 513.8kb + elm.opt.transformed.min.js 79.5kb + elm.opt.transformed.min.js.gz 25.2kb + + +## Elm Core + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| sum 300 list of custom types | |safari | 1,296,660| | +| sum 300 list of custom types |final |safari | 1,288,062| (99%) | +| sum 300 list of custom types | |firefox | 210,034| | +| sum 300 list of custom types |final |firefox | 265,892| (127%) | +| sum 300 list of custom types | |chrome | 1,026,682| | +| sum 300 list of custom types |final |chrome | 1,210,558| (118%) | +| Update single record | |safari | 288,769| | +| Update single record |final |safari | 2,912,691| (1009%) | +| Update single record | |firefox | 505,461| | +| Update single record |final |firefox | 1,585,253| (314%) | +| Update single record | |chrome | 601,248| | +| Update single record |final |chrome | 7,486,918| (1245%) | +| Update single record via inlining creation in elm| |safari | 52,961,934| | +| Update single record via inlining creation in elm|final |safari | 52,646,123| (99%) | +| Update single record via inlining creation in elm| |firefox | 63,471,865| | +| Update single record via inlining creation in elm|final |firefox | 67,806,084| (107%) | +| Update single record via inlining creation in elm| |chrome | 137,488,239| | +| Update single record via inlining creation in elm|final |chrome | 116,553,788| (85%) | +| Return list literal | |safari | 7,840,001| | +| Return list literal |final |safari | 8,073,418| (103%) | +| Return list literal | |firefox | 7,564,403| | +| Return list literal |final |firefox | 7,685,152| (102%) | +| Return list literal | |chrome | 19,910,849| | +| Return list literal |final |chrome | 17,328,538| (87%) | +| Dict.fromList | |safari | 799,466| | +| Dict.fromList |final |safari | 947,506| (119%) | +| Dict.fromList | |firefox | 375,214| | +| Dict.fromList |final |firefox | 525,806| (140%) | +| Dict.fromList | |chrome | 910,947| | +| Dict.fromList |final |chrome | 1,218,456| (134%) | +| Dict.get | |safari | 10,096,723| | +| Dict.get |final |safari | 11,608,995| (115%) | +| Dict.get | |firefox | 5,312,060| | +| Dict.get |final |firefox | 6,059,408| (114%) | +| Dict.get | |chrome | 17,448,500| | +| Dict.get |final |chrome | 15,549,367| (89%) | +| Dict.insert | |safari | 5,836,739| | +| Dict.insert |final |safari | 6,364,290| (109%) | +| Dict.insert | |firefox | 3,169,006| | +| Dict.insert |final |firefox | 3,951,704| (125%) | +| Dict.insert | |chrome | 9,402,128| | +| Dict.insert |final |chrome | 9,453,835| (101%) | +| Dict.toList | |safari | 4,021,601| | +| Dict.toList |final |safari | 5,279,232| (131%) | +| Dict.toList | |firefox | 2,129,474| | +| Dict.toList |final |firefox | 4,091,994| (192%) | +| Dict.toList | |chrome | 4,738,967| | +| Dict.toList |final |chrome | 9,253,953| (195%) | +| Dict.size | |safari | 13,658,424| | +| Dict.size |final |safari | 19,454,288| (142%) | +| Dict.size | |firefox | 6,582,532| | +| Dict.size |final |firefox | 8,107,315| (123%) | +| Dict.size | |chrome | 26,130,875| | +| Dict.size |final |chrome | 16,922,711| (65%) | +| Calling a function with a 6 record arg | |safari | 74,571,721| | +| Calling a function with a 6 record arg |final |safari | 76,562,843| (103%) | +| Calling a function with a 6 record arg | |firefox | 72,786,138| | +| Calling a function with a 6 record arg |final |firefox | 72,397,919| (99%) | +| Calling a function with a 6 record arg | |chrome | 156,353,793| | +| Calling a function with a 6 record arg |final |chrome | 137,741,759| (88%) | +| Calling a function with 6 argsl | |safari | 47,780,314| | +| Calling a function with 6 argsl |final |safari | 80,922,481| (169%) | +| Calling a function with 6 argsl | |firefox | 57,285,191| | +| Calling a function with 6 argsl |final |firefox | 72,371,785| (126%) | +| Calling a function with 6 argsl | |chrome | 155,756,282| | +| Calling a function with 6 argsl |final |chrome | 140,992,312| (91%) | +| Encode string | |safari | 5,377,126| | +| Encode string |final |safari | 5,335,841| (99%) | +| Encode string | |firefox | 6,413,473| | +| Encode string |final |firefox | 7,122,324| (111%) | +| Encode string | |chrome | 5,857,319| | +| Encode string |final |chrome | 5,069,075| (87%) | +| Encode Object | |safari | 1,033,595| | +| Encode Object |final |safari | 1,073,695| (104%) | +| Encode Object | |firefox | 951,481| | +| Encode Object |final |firefox | 1,094,781| (115%) | +| Encode Object | |chrome | 1,118,925| | +| Encode Object |final |chrome | 1,175,314| (105%) | +| Equals literal int | |safari | 64,782,668| | +| Equals literal int |final |safari | 78,483,994| (121%) | +| Equals literal int | |firefox | 74,801,912| | +| Equals literal int |final |firefox | 95,517,084| (128%) | +| Equals literal int | |chrome | 163,961,176| | +| Equals literal int |final |chrome | 145,562,715| (89%) | +| Equals, no literal | |safari | 36,489,670| | +| Equals, no literal |final |safari | 39,395,452| (108%) | +| Equals, no literal | |firefox | 39,188,218| | +| Equals, no literal |final |firefox | 42,290,830| (108%) | +| Equals, no literal | |chrome | 161,783,732| | +| Equals, no literal |final |chrome | 143,900,730| (89%) | + + +## Elm CSS - Realworld + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| Search form inspired by vy.no | |safari | 2,734| | +| Search form inspired by vy.no |final |safari | 3,498| (128%) | +| Search form inspired by vy.no | |firefox | 2,262| | +| Search form inspired by vy.no |final |firefox | 2,610| (115%) | +| Search form inspired by vy.no | |chrome | 4,878| | +| Search form inspired by vy.no |final |chrome | 5,829| (119%) | + + +## Html + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested html tree | |safari | 51,906| | +| create a 4 level nested html tree |final |safari | 72,600| (140%) | +| create a 4 level nested html tree | |firefox | 30,449| | +| create a 4 level nested html tree |final |firefox | 49,892| (164%) | +| create a 4 level nested html tree | |chrome | 49,663| | +| create a 4 level nested html tree |final |chrome | 128,742| (259%) | + + +## Elm UI + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested Elm UI tree | |safari | 3,958| | +| create a 4 level nested Elm UI tree |final |safari | 4,591| (116%) | +| create a 4 level nested Elm UI tree | |firefox | 2,776| | +| create a 4 level nested Elm UI tree |final |firefox | 3,537| (127%) | +| create a 4 level nested Elm UI tree | |chrome | 5,213| | +| create a 4 level nested Elm UI tree |final |chrome | 6,869| (132%) | + + +## Elm Markdown + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| just a heading | |safari | 81,427| | +| just a heading |final |safari | 105,475| (130%) | +| just a heading | |firefox | 55,453| | +| just a heading |final |firefox | 76,058| (137%) | +| just a heading | |chrome | 89,284| | +| just a heading |final |chrome | 142,918| (160%) | +| elm-explorations/markdown readme | |safari | 22,997| | +| elm-explorations/markdown readme |final |safari | 29,968| (130%) | +| elm-explorations/markdown readme | |firefox | 15,220| | +| elm-explorations/markdown readme |final |firefox | 20,253| (133%) | +| elm-explorations/markdown readme | |chrome | 24,628| | +| elm-explorations/markdown readme |final |chrome | 39,518| (160%) | +| withHeadingsAndLists | |safari | 3,604| | +| withHeadingsAndLists |final |safari | 4,791| (133%) | +| withHeadingsAndLists | |firefox | 2,524| | +| withHeadingsAndLists |final |firefox | 3,379| (134%) | +| withHeadingsAndLists | |chrome | 3,940| | +| withHeadingsAndLists |final |chrome | 6,316| (160%) | +| withHeadingsAndListsAndHtml | |safari | 2,398| | +| withHeadingsAndListsAndHtml |final |safari | 3,213| (134%) | +| withHeadingsAndListsAndHtml | |firefox | 1,704| | +| withHeadingsAndListsAndHtml |final |firefox | 2,317| (136%) | +| withHeadingsAndListsAndHtml | |chrome | 2,667| | +| withHeadingsAndListsAndHtml |final |chrome | 4,203| (158%) | + + + diff --git a/data/current/results.previous.v1.md b/data/current/results.previous.v1.md new file mode 100644 index 0000000..1b50712 --- /dev/null +++ b/data/current/results.previous.v1.md @@ -0,0 +1,216 @@ +# Benchmark results + +## Elm Core asset overview + + .keep 0kb + elm.opt.js 165kb + elm.opt.min.js 32.6kb + elm.opt.min.js.gz 11.1kb + elm.opt.transformed.js 225kb + elm.opt.transformed.min.js 31.1kb + elm.opt.transformed.min.js.gz 10.9kb + +## Elm CSS - Realworld asset overview + + .keep 0kb + elm.opt.js 253kb + elm.opt.min.js 47.3kb + elm.opt.min.js.gz 14.7kb + elm.opt.transformed.js 344.2kb + elm.opt.transformed.min.js 46kb + elm.opt.transformed.min.js.gz 14.6kb + +## Html asset overview + + .keep 0kb + elm.opt.js 142.5kb + elm.opt.min.js 21.8kb + elm.opt.min.js.gz 7.3kb + elm.opt.transformed.js 197.4kb + elm.opt.transformed.min.js 20.8kb + elm.opt.transformed.min.js.gz 7.1kb + +## Elm UI asset overview + + .keep 0kb + elm.opt.js 352.3kb + elm.opt.min.js 72.4kb + elm.opt.min.js.gz 20.1kb + elm.opt.transformed.js 444.3kb + elm.opt.transformed.min.js 69.5kb + elm.opt.transformed.min.js.gz 19.9kb + +## Elm Markdown asset overview + + .keep 0kb + elm.opt.js 404.9kb + elm.opt.min.js 81kb + elm.opt.min.js.gz 25.1kb + elm.opt.transformed.js 513.2kb + elm.opt.transformed.min.js 77.5kb + elm.opt.transformed.min.js.gz 24.8kb + + +## Elm Core + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| sum 300 list of custom types | |safari | 1,122,920| | +| sum 300 list of custom types |final |safari | 1,339,447| (119%) | +| sum 300 list of custom types | |firefox | 202,165| | +| sum 300 list of custom types |final |firefox | 258,208| (128%) | +| sum 300 list of custom types | |chrome | 985,551| | +| sum 300 list of custom types |final |chrome | 1,258,988| (128%) | +| Update single record | |safari | 285,487| | +| Update single record |final |safari | 273,053| (96%) | +| Update single record | |firefox | 481,889| | +| Update single record |final |firefox | 485,574| (101%) | +| Update single record | |chrome | 543,495| | +| Update single record |final |chrome | 549,652| (101%) | +| Update single record via inlining creation in elm| |safari | 47,060,680| | +| Update single record via inlining creation in elm|final |safari | 49,017,329| (104%) | +| Update single record via inlining creation in elm| |firefox | 65,409,572| | +| Update single record via inlining creation in elm|final |firefox | 66,672,028| (102%) | +| Update single record via inlining creation in elm| |chrome | 120,527,031| | +| Update single record via inlining creation in elm|final |chrome | 112,484,228| (93%) | +| Return list literal | |safari | 7,185,232| | +| Return list literal |final |safari | 7,741,276| (108%) | +| Return list literal | |firefox | 7,232,739| | +| Return list literal |final |firefox | 7,100,726| (98%) | +| Return list literal | |chrome | 18,330,444| | +| Return list literal |final |chrome | 18,382,338| (100%) | +| Dict.fromList | |safari | 777,425| | +| Dict.fromList |final |safari | 891,584| (115%) | +| Dict.fromList | |firefox | 368,420| | +| Dict.fromList |final |firefox | 506,624| (138%) | +| Dict.fromList | |chrome | 805,806| | +| Dict.fromList |final |chrome | 1,203,339| (149%) | +| Dict.get | |safari | 9,614,821| | +| Dict.get |final |safari | 11,153,610| (116%) | +| Dict.get | |firefox | 5,148,983| | +| Dict.get |final |firefox | 5,841,445| (113%) | +| Dict.get | |chrome | 15,305,826| | +| Dict.get |final |chrome | 15,930,631| (104%) | +| Dict.insert | |safari | 5,533,861| | +| Dict.insert |final |safari | 6,237,408| (113%) | +| Dict.insert | |firefox | 3,065,411| | +| Dict.insert |final |firefox | 3,842,599| (125%) | +| Dict.insert | |chrome | 8,230,657| | +| Dict.insert |final |chrome | 9,703,920| (118%) | +| Dict.toList | |safari | 3,974,009| | +| Dict.toList |final |safari | 5,187,987| (131%) | +| Dict.toList | |firefox | 2,043,794| | +| Dict.toList |final |firefox | 4,069,449| (199%) | +| Dict.toList | |chrome | 4,385,824| | +| Dict.toList |final |chrome | 9,480,965| (216%) | +| Dict.size | |safari | 13,080,109| | +| Dict.size |final |safari | 19,563,417| (150%) | +| Dict.size | |firefox | 6,290,526| | +| Dict.size |final |firefox | 8,380,572| (133%) | +| Dict.size | |chrome | 23,732,472| | +| Dict.size |final |chrome | 17,132,119| (72%) | +| Calling a function with a 6 record arg | |safari | 75,612,924| | +| Calling a function with a 6 record arg |final |safari | 75,411,922| (100%) | +| Calling a function with a 6 record arg | |firefox | 71,024,170| | +| Calling a function with a 6 record arg |final |firefox | 72,969,345| (103%) | +| Calling a function with a 6 record arg | |chrome | 142,766,347| | +| Calling a function with a 6 record arg |final |chrome | 142,377,067| (100%) | +| Calling a function with 6 argsl | |safari | 46,632,357| | +| Calling a function with 6 argsl |final |safari | 78,086,967| (167%) | +| Calling a function with 6 argsl | |firefox | 58,577,180| | +| Calling a function with 6 argsl |final |firefox | 71,469,456| (122%) | +| Calling a function with 6 argsl | |chrome | 141,124,644| | +| Calling a function with 6 argsl |final |chrome | 141,435,758| (100%) | +| Encode string | |safari | 5,156,824| | +| Encode string |final |safari | 5,232,578| (101%) | +| Encode string | |firefox | 6,010,216| | +| Encode string |final |firefox | 6,665,525| (111%) | +| Encode string | |chrome | 5,084,119| | +| Encode string |final |chrome | 5,125,981| (101%) | +| Encode Object | |safari | 792,968| | +| Encode Object |final |safari | 1,014,029| (128%) | +| Encode Object | |firefox | 920,324| | +| Encode Object |final |firefox | 1,051,205| (114%) | +| Encode Object | |chrome | 1,147,426| | +| Encode Object |final |chrome | 1,094,538| (95%) | +| Equals literal int | |safari | 72,271,904| | +| Equals literal int |final |safari | 75,441,830| (104%) | +| Equals literal int | |firefox | 75,624,824| | +| Equals literal int |final |firefox | 98,546,819| (130%) | +| Equals literal int | |chrome | 149,603,013| | +| Equals literal int |final |chrome | 145,146,168| (97%) | +| Equals, no literal | |safari | 36,965,072| | +| Equals, no literal |final |safari | 36,651,586| (99%) | +| Equals, no literal | |firefox | 36,652,647| | +| Equals, no literal |final |firefox | 39,483,689| (108%) | +| Equals, no literal | |chrome | 147,454,416| | +| Equals, no literal |final |chrome | 148,978,988| (101%) | + + +## Elm CSS - Realworld + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| Search form inspired by vy.no | |safari | 2,625| | +| Search form inspired by vy.no |final |safari | 3,159| (120%) | +| Search form inspired by vy.no | |firefox | 2,176| | +| Search form inspired by vy.no |final |firefox | 2,414| (111%) | +| Search form inspired by vy.no | |chrome | 4,620| | +| Search form inspired by vy.no |final |chrome | 4,968| (108%) | + + +## Html + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested html tree | |safari | 50,007| | +| create a 4 level nested html tree |final |safari | 59,729| (119%) | +| create a 4 level nested html tree | |firefox | 30,417| | +| create a 4 level nested html tree |final |firefox | 39,484| (130%) | +| create a 4 level nested html tree | |chrome | 48,335| | +| create a 4 level nested html tree |final |chrome | 63,608| (132%) | + + +## Elm UI + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| create a 4 level nested Elm UI tree | |safari | 3,811| | +| create a 4 level nested Elm UI tree |final |safari | 4,447| (117%) | +| create a 4 level nested Elm UI tree | |firefox | 2,665| | +| create a 4 level nested Elm UI tree |final |firefox | 3,314| (124%) | +| create a 4 level nested Elm UI tree | |chrome | 5,189| | +| create a 4 level nested Elm UI tree |final |chrome | 6,272| (121%) | + + +## Elm Markdown + +|Name |Transformtions |Browser |Ops/Second |% Change| +|----------------------------------------|------------------------------|----------|--------------|--------| +| just a heading | |safari | 77,945| | +| just a heading |final |safari | 105,462| (135%) | +| just a heading | |firefox | 54,221| | +| just a heading |final |firefox | 72,397| (134%) | +| just a heading | |chrome | 87,820| | +| just a heading |final |chrome | 129,101| (147%) | +| elm-explorations/markdown readme | |safari | 22,395| | +| elm-explorations/markdown readme |final |safari | 28,155| (126%) | +| elm-explorations/markdown readme | |firefox | 14,710| | +| elm-explorations/markdown readme |final |firefox | 19,615| (133%) | +| elm-explorations/markdown readme | |chrome | 23,794| | +| elm-explorations/markdown readme |final |chrome | 36,786| (155%) | +| withHeadingsAndLists | |safari | 3,482| | +| withHeadingsAndLists |final |safari | 4,521| (130%) | +| withHeadingsAndLists | |firefox | 2,431| | +| withHeadingsAndLists |final |firefox | 3,228| (133%) | +| withHeadingsAndLists | |chrome | 3,793| | +| withHeadingsAndLists |final |chrome | 5,827| (154%) | +| withHeadingsAndListsAndHtml | |safari | 2,317| | +| withHeadingsAndListsAndHtml |final |safari | 3,059| (132%) | +| withHeadingsAndListsAndHtml | |firefox | 1,643| | +| withHeadingsAndListsAndHtml |final |firefox | 2,191| (133%) | +| withHeadingsAndListsAndHtml | |chrome | 2,585| | +| withHeadingsAndListsAndHtml |final |chrome | 3,890| (150%) | + + + diff --git a/data/results.current.md b/data/v1/results.previous.v1.md similarity index 100% rename from data/results.current.md rename to data/v1/results.previous.v1.md diff --git a/src/benchmark/run.ts b/src/benchmark/run.ts index 4ed52ed..3e4682a 100644 --- a/src/benchmark/run.ts +++ b/src/benchmark/run.ts @@ -25,18 +25,18 @@ const options = { browser: Browser.Chrome, headless: true, }, - // { - // browser: Browser.Firefox, - // headless: true, - // }, -// { -// browser: Browser.Safari, -// headless: true, -// }, + { + browser: Browser.Firefox, + headless: true, + }, + { + browser: Browser.Safari, + headless: true, + }, ], transforms: - Types.benchmarkDefaults(false, null) - // Types.previous.v1 + Types.benchmarkDefaults(true, null) +// Types.previous.v1 }; @@ -45,32 +45,32 @@ async function go() { // Use `runWithBreakdown` if you want the breakdown // const report = await Reporting.runWithKnockout(options, [ // const report = await Reporting.runWithBreakdown(options, [ - // { - // name: 'Elm Core', - // dir: 'testcases/core', - // elmFile: 'V8/Benchmark.elm', - // }, + { + name: 'Elm Core', + dir: 'testcases/core', + elmFile: 'V8/Benchmark.elm', + }, // { // name: 'Elm CSS', // dir: 'testcases/elm-css', // elmFile: 'V8/Benchmark.elm', // }, - // { - // name: 'Elm CSS - Realworld', - // dir: 'testcases/elm-css-realworld', - // elmFile: 'V8/Benchmark.elm', - // }, + { + name: 'Elm CSS - Realworld', + dir: 'testcases/elm-css-realworld', + elmFile: 'V8/Benchmark.elm', + }, { name: 'Html', dir: 'testcases/html', elmFile: 'V8/Benchmark.elm', }, - // { - // name: 'Elm UI', - // dir: 'testcases/elm-ui', - // elmFile: 'V8/Benchmark.elm', - // }, - // { + { + name: 'Elm UI', + dir: 'testcases/elm-ui', + elmFile: 'V8/Benchmark.elm', + }, +// { // name: 'Elm UI 2', // dir: 'testcases/elm-ui-2', // elmFile: 'V8/Benchmark.elm', @@ -80,11 +80,11 @@ async function go() { // dir: 'testcases/elm-animator', // elmFile: 'V8/Benchmark.elm', // }, - // { - // name: 'Elm Markdown', - // dir: 'testcases/elm-markdown', - // elmFile: 'V8/Benchmark.elm', - // }, + { + name: 'Elm Markdown', + dir: 'testcases/elm-markdown', + elmFile: 'V8/Benchmark.elm', + }, // // // This one takes forever // { // name: 'elm-obj-file',