voby icon indicating copy to clipboard operation
voby copied to clipboard

UIBench

Open leeoniya opened this issue 2 years ago • 12 comments

@fabiospampinato would be interesting to see how voby does on https://localvoid.github.io/uibench/ (by author of https://github.com/localvoid/ivi)

could reveal some more optimization nuggets!

leeoniya avatar Nov 01 '22 16:11 leeoniya

I guess I can port Ryan's implementation.

There doesn't seem to be a nice comparison table like for js-framework-benchmark though, one would have to either make something by hand or compare the output json object manually.

fabiospampinato avatar Nov 01 '22 16:11 fabiospampinato

There doesn't seem to be a nice comparison table like for js-framework-benchmark though

it reports each run's results back to the main window, you gotta scroll down:

image

leeoniya avatar Nov 01 '22 17:11 leeoniya

Did you get that from here: https://localvoid.github.io/uibench/ ?

Either way the repo seems abandoned. That version of Solid is years old at this point I think.

fabiospampinato avatar Nov 01 '22 17:11 fabiospampinato

I don't know how to use that page, there's no "start" button, if I click on the name of frameworks it opens github 🤷‍♂️

fabiospampinato avatar Nov 01 '22 17:11 fabiospampinato

you gotta click the version button, e.g. "stable"

the way to contribute is a bit odd, but possible: https://github.com/localvoid/uibench/issues/22

leeoniya avatar Nov 01 '22 17:11 leeoniya

I'm trying to port Solid's version. The code might be the strangest one I've seen in a while though 😂

fabiospampinato avatar Nov 01 '22 21:11 fabiospampinato

The code might be the strangest one I've seen in a while though

doesn't sound like a terribly idiomatic impl :grimacing:. hopefully the voby version is more straightforward :+1:

leeoniya avatar Nov 01 '22 21:11 leeoniya

Implemented, npm run dev:uibench to run it.

I'm getting these numbers for Voby:

{
  "table/[100,4]/render": [
    6.300000011920929,
    2.300000011920929,
    2.400000035762787,
    2.100000023841858,
    2.399999976158142
  ],
  "table/[50,4]/render": [
    4.5,
    1.199999988079071,
    1.300000011920929,
    1.199999988079071,
    1.300000011920929
  ],
  "table/[100,2]/render": [
    3,
    1.9000000357627869,
    2.100000023841858,
    2.200000047683716,
    2.099999964237213
  ],
  "table/[50,2]/render": [
    1.399999976158142,
    1.100000023841858,
    1.0999999642372131,
    1.199999988079071,
    1.0999999642372131
  ],
  "table/[100,4]/removeAll": [
    1.600000023841858,
    0.699999988079071,
    0.5999999642372131,
    0.6000000238418579,
    0.5
  ],
  "table/[50,4]/removeAll": [
    0.5,
    0.5,
    0.3999999761581421,
    0.3999999761581421,
    0.5
  ],
  "table/[100,2]/removeAll": [
    0.40000003576278687,
    0.699999988079071,
    0.6000000238418579,
    0.5,
    0.5
  ],
  "table/[50,2]/removeAll": [
    0.3999999761581421,
    0.30000001192092896,
    0.5,
    0.40000003576278687,
    0.30000001192092896
  ],
  "table/[100,4]/sort/0": [
    2.400000035762787,
    1.7000000476837158,
    1.600000023841858,
    1.699999988079071,
    1.899999976158142
  ],
  "table/[50,4]/sort/0": [
    1,
    0.8999999761581421,
    0.9000000357627869,
    1,
    0.8999999761581421
  ],
  "table/[100,2]/sort/0": [
    1.399999976158142,
    1.300000011920929,
    1.300000011920929,
    1.199999988079071,
    1.199999988079071
  ],
  "table/[50,2]/sort/0": [
    0.800000011920929,
    0.800000011920929,
    0.7999999523162842,
    0.800000011920929,
    0.800000011920929
  ],
  "table/[100,4]/sort/1": [
    1.5999999642372131,
    1.800000011920929,
    1.800000011920929,
    1.800000011920929,
    1.7999999523162842
  ],
  "table/[50,4]/sort/1": [
    1.199999988079071,
    1,
    0.8999999761581421,
    1,
    0.8999999761581421
  ],
  "table/[100,2]/sort/1": [
    1.399999976158142,
    1.199999988079071,
    1.399999976158142,
    1.300000011920929,
    1.300000011920929
  ],
  "table/[50,2]/sort/1": [
    0.699999988079071,
    0.800000011920929,
    0.800000011920929,
    0.7999999523162842,
    0.699999988079071
  ],
  "table/[100,4]/filter/32": [
    1.5,
    1.300000011920929,
    1.600000023841858,
    1.5,
    1.399999976158142
  ],
  "table/[50,4]/filter/32": [
    0.800000011920929,
    0.5,
    0.8999999761581421,
    0.7000000476837158,
    0.6000000238418579
  ],
  "table/[100,2]/filter/32": [
    1.100000023841858,
    1.300000011920929,
    1.100000023841858,
    1,
    1.199999988079071
  ],
  "table/[50,2]/filter/32": [
    0.5,
    0.800000011920929,
    0.699999988079071,
    0.5,
    0.699999988079071
  ],
  "table/[100,4]/filter/16": [
    1.5,
    1.699999988079071,
    1.600000023841858,
    1.7999999523162842,
    1.800000011920929
  ],
  "table/[50,4]/filter/16": [
    0.800000011920929,
    0.800000011920929,
    0.7000000476837158,
    0.800000011920929,
    1
  ],
  "table/[100,2]/filter/16": [
    1.199999988079071,
    1.399999976158142,
    1.4000000357627869,
    1.2000000476837158,
    1.300000011920929
  ],
  "table/[50,2]/filter/16": [
    0.9000000357627869,
    0.5999999642372131,
    0.699999988079071,
    0.699999988079071,
    0.800000011920929
  ],
  "table/[100,4]/filter/8": [
    1.699999988079071,
    1.600000023841858,
    1.899999976158142,
    1.600000023841858,
    1.699999988079071
  ],
  "table/[50,4]/filter/8": [
    0.9000000357627869,
    0.800000011920929,
    0.800000011920929,
    0.8999999761581421,
    0.699999988079071
  ],
  "table/[100,2]/filter/8": [
    1.300000011920929,
    1.100000023841858,
    1.300000011920929,
    1.199999988079071,
    1.199999988079071
  ],
  "table/[50,2]/filter/8": [
    0.699999988079071,
    0.9000000357627869,
    0.800000011920929,
    0.800000011920929,
    0.800000011920929
  ],
  "table/[100,4]/filter/4": [
    1.699999988079071,
    1.5,
    1.600000023841858,
    1.5,
    1.5999999642372131
  ],
  "table/[50,4]/filter/4": [
    0.9000000357627869,
    0.800000011920929,
    0.800000011920929,
    0.7999999523162842,
    0.8999999761581421
  ],
  "table/[100,2]/filter/4": [
    1.399999976158142,
    1.199999988079071,
    1.199999988079071,
    1.100000023841858,
    1.199999988079071
  ],
  "table/[50,2]/filter/4": [
    0.699999988079071,
    0.8999999761581421,
    0.5999999642372131,
    0.5999999642372131,
    0.699999988079071
  ],
  "table/[100,4]/activate/32": [
    1,
    0.8999999761581421,
    0.9000000357627869,
    0.8999999761581421,
    0.8999999761581421
  ],
  "table/[50,4]/activate/32": [
    0.5999999642372131,
    0.699999988079071,
    0.3999999761581421,
    0.3999999761581421,
    0.6000000238418579
  ],
  "table/[100,2]/activate/32": [
    0.7999999523162842,
    0.9000000357627869,
    1,
    0.7999999523162842,
    1
  ],
  "table/[50,2]/activate/32": [
    0.6000000238418579,
    0.5,
    0.800000011920929,
    0.5999999642372131,
    0.5
  ],
  "table/[100,4]/activate/16": [
    1.199999988079071,
    1,
    0.800000011920929,
    1,
    0.8999999761581421
  ],
  "table/[50,4]/activate/16": [
    0.5,
    0.699999988079071,
    0.6000000238418579,
    0.5999999642372131,
    0.5
  ],
  "table/[100,2]/activate/16": [
    1.0999999642372131,
    0.8999999761581421,
    0.800000011920929,
    0.8999999761581421,
    0.8999999761581421
  ],
  "table/[50,2]/activate/16": [
    0.5999999642372131,
    0.800000011920929,
    0.5,
    0.699999988079071,
    0.6000000238418579
  ],
  "table/[100,4]/activate/8": [
    1.0999999642372131,
    1.2999999523162842,
    1.0999999642372131,
    1.100000023841858,
    1.0999999642372131
  ],
  "table/[50,4]/activate/8": [
    0.699999988079071,
    0.699999988079071,
    0.699999988079071,
    0.699999988079071,
    0.6000000238418579
  ],
  "table/[100,2]/activate/8": [
    1,
    1,
    0.8999999761581421,
    1,
    0.9000000357627869
  ],
  "table/[50,2]/activate/8": [
    0.7000000476837158,
    0.5999999642372131,
    0.5,
    0.5,
    0.699999988079071
  ],
  "table/[100,4]/activate/4": [
    1,
    1,
    1.0999999642372131,
    1.100000023841858,
    1.199999988079071
  ],
  "table/[50,4]/activate/4": [
    0.5999999642372131,
    0.699999988079071,
    0.7000000476837158,
    0.699999988079071,
    0.6000000238418579
  ],
  "table/[100,2]/activate/4": [
    1.0999999642372131,
    1.100000023841858,
    1.100000023841858,
    1.100000023841858,
    0.7000000476837158
  ],
  "table/[50,2]/activate/4": [
    0.6000000238418579,
    0.699999988079071,
    0.699999988079071,
    0.699999988079071,
    0.5999999642372131
  ],
  "anim/100/32": [
    0.2999999523162842,
    0.20000004768371582,
    0.19999998807907104,
    0.30000001192092896,
    0.19999998807907104
  ],
  "anim/100/16": [
    0.30000001192092896,
    0.5,
    0.19999998807907104,
    0.19999998807907104,
    0.30000001192092896
  ],
  "anim/100/8": [
    0.30000001192092896,
    0.5,
    0.5,
    0.30000001192092896,
    0.5
  ],
  "anim/100/4": [
    0.6000000238418579,
    0.6000000238418579,
    1.7999999523162842,
    0.3999999761581421,
    0.40000003576278687
  ],
  "tree/[500]/render": [
    10.5,
    6,
    8.699999988079071,
    6.100000023841858,
    6.5
  ],
  "tree/[50,10]/render": [
    7.600000023841858,
    6.300000011920929,
    4.599999964237213,
    6.100000023841858,
    4.399999976158142
  ],
  "tree/[10,50]/render": [
    4.099999964237213,
    3.5,
    3.800000011920929,
    3.5,
    3.600000023841858
  ],
  "tree/[5,100]/render": [
    5.199999988079071,
    3.199999988079071,
    3.200000047683716,
    3.399999976158142,
    3.100000023841858
  ],
  "tree/[2,2,2,2,2,2,2,2,2,2]/render": [
    17.099999964237213,
    17.5,
    15.5,
    18.600000023841858,
    16.599999964237213
  ],
  "tree/[500]/removeAll": [
    0.800000011920929,
    0.9000000357627869,
    0.8999999761581421,
    0.9000000357627869,
    0.8999999761581421
  ],
  "tree/[50,10]/removeAll": [
    0.9000000357627869,
    1,
    0.8999999761581421,
    0.800000011920929,
    0.9000000357627869
  ],
  "tree/[10,50]/removeAll": [
    0.8999999761581421,
    0.800000011920929,
    0.800000011920929,
    0.800000011920929,
    0.699999988079071
  ],
  "tree/[5,100]/removeAll": [
    0.800000011920929,
    0.8999999761581421,
    1,
    0.800000011920929,
    0.8999999761581421
  ],
  "tree/[2,2,2,2,2,2,2,2,2,2]/removeAll": [
    5.800000011920929,
    3.200000047683716,
    3.199999988079071,
    3.300000011920929,
    3.100000023841858
  ],
  "tree/[500]/[reverse]": [
    1.699999988079071,
    1.5999999642372131,
    1.2999999523162842,
    1.5,
    1.2999999523162842
  ],
  "tree/[50,10]/[reverse]": [
    1.899999976158142,
    1.800000011920929,
    1.7000000476837158,
    1.5999999642372131,
    1.7000000476837158
  ],
  "tree/[10,50]/[reverse]": [
    1.699999988079071,
    1.4000000357627869,
    1.5999999642372131,
    1.5,
    1.399999976158142
  ],
  "tree/[5,100]/[reverse]": [
    1.5999999642372131,
    1.5,
    1.5,
    1.300000011920929,
    1.399999976158142
  ],
  "tree/[500]/[insertFirst(1)]": [
    1.399999976158142,
    1.399999976158142,
    1.600000023841858,
    1.5,
    1.600000023841858
  ],
  "tree/[50,10]/[insertFirst(1)]": [
    1.899999976158142,
    1.9000000357627869,
    2.100000023841858,
    2,
    1.800000011920929
  ],
  "tree/[10,50]/[insertFirst(1)]": [
    2,
    1.899999976158142,
    2.200000047683716,
    1.899999976158142,
    1.9000000357627869
  ],
  "tree/[5,100]/[insertFirst(1)]": [
    2,
    2,
    2,
    2,
    1.9000000357627869
  ],
  "tree/[500]/[insertLast(1)]": [
    0.7999999523162842,
    0.6000000238418579,
    0.699999988079071,
    0.7999999523162842,
    0.6000000238418579
  ],
  "tree/[50,10]/[insertLast(1)]": [
    1,
    1.0999999642372131,
    0.8999999761581421,
    0.8999999761581421,
    1
  ],
  "tree/[10,50]/[insertLast(1)]": [
    0.7999999523162842,
    0.8999999761581421,
    1,
    0.8999999761581421,
    0.9000000357627869
  ],
  "tree/[5,100]/[insertLast(1)]": [
    1.0999999642372131,
    0.699999988079071,
    0.9000000357627869,
    0.9000000357627869,
    0.8999999761581421
  ],
  "tree/[500]/[removeFirst(1)]": [
    1.600000023841858,
    1.5999999642372131,
    1.5999999642372131,
    1.5,
    1.5
  ],
  "tree/[50,10]/[removeFirst(1)]": [
    1.800000011920929,
    2.099999964237213,
    1.9000000357627869,
    2.099999964237213,
    1.800000011920929
  ],
  "tree/[10,50]/[removeFirst(1)]": [
    1.600000023841858,
    1.5999999642372131,
    1.5,
    1.5999999642372131,
    1.5
  ],
  "tree/[5,100]/[removeFirst(1)]": [
    1.399999976158142,
    1.399999976158142,
    1.4000000357627869,
    1.399999976158142,
    1.4000000357627869
  ],
  "tree/[500]/[removeLast(1)]": [
    0.800000011920929,
    0.6000000238418579,
    0.699999988079071,
    0.800000011920929,
    0.7000000476837158
  ],
  "tree/[50,10]/[removeLast(1)]": [
    1,
    0.9000000357627869,
    1.0999999642372131,
    1.100000023841858,
    0.9000000357627869
  ],
  "tree/[10,50]/[removeLast(1)]": [
    0.800000011920929,
    0.8999999761581421,
    0.7999999523162842,
    1,
    0.8999999761581421
  ],
  "tree/[5,100]/[removeLast(1)]": [
    0.8999999761581421,
    0.800000011920929,
    0.800000011920929,
    0.699999988079071,
    0.800000011920929
  ],
  "tree/[500]/[moveFromEndToStart(1)]": [
    1.399999976158142,
    1.600000023841858,
    1.5,
    1.5,
    1.5
  ],
  "tree/[50,10]/[moveFromEndToStart(1)]": [
    1.7000000476837158,
    1.800000011920929,
    1.699999988079071,
    1.800000011920929,
    1.9000000357627869
  ],
  "tree/[10,50]/[moveFromEndToStart(1)]": [
    1.600000023841858,
    2,
    1.5,
    1.5,
    1.600000023841858
  ],
  "tree/[5,100]/[moveFromEndToStart(1)]": [
    1.699999988079071,
    1.5,
    1.600000023841858,
    1.5999999642372131,
    1.5
  ],
  "tree/[500]/[moveFromStartToEnd(1)]": [
    1.5,
    1.5,
    1.5,
    1.5,
    1.5
  ],
  "tree/[50,10]/[moveFromStartToEnd(1)]": [
    1.7000000476837158,
    1.7000000476837158,
    1.600000023841858,
    1.7000000476837158,
    1.7000000476837158
  ],
  "tree/[10,50]/[moveFromStartToEnd(1)]": [
    1.4000000357627869,
    1.4000000357627869,
    1.399999976158142,
    1.5,
    1.5
  ],
  "tree/[5,100]/[moveFromStartToEnd(1)]": [
    1.699999988079071,
    1.5,
    1.699999988079071,
    1.600000023841858,
    1.5999999642372131
  ],
  "tree/[500]/[kivi_worst_case]": [
    1.600000023841858,
    1.5,
    1.2999999523162842,
    1.5,
    1.5
  ],
  "tree/[500]/[snabbdom_worst_case]": [
    1.5,
    1.399999976158142,
    1.399999976158142,
    1.199999988079071,
    1.5
  ],
  "tree/[500]/[react_worst_case]": [
    0.800000011920929,
    0.699999988079071,
    0.800000011920929,
    0.699999988079071,
    0.5999999642372131
  ],
  "tree/[500]/[virtual_dom_worst_case]": [
    1.800000011920929,
    1.699999988079071,
    1.800000011920929,
    1.800000011920929,
    1.600000023841858
  ],
  "tree/[10,10,10,10]/no_change": [
    17.100000023841858,
    16.5,
    16.69999998807907,
    19.69999998807907,
    16.400000035762787
  ],
  "tree/[2,2,2,2,2,2,2,2,2,2]/no_change": [
    6.100000023841858,
    6.100000023841858,
    6,
    6,
    5.899999976158142
  ]
}

And these numbers for Solid:

{
 "table/[100,4]/render": [
  1.5999999642372131,
  0.699999988079071,
  0.6000000238418579,
  0.7999999523162842,
  0.699999988079071
 ],
 "table/[50,4]/render": [
  0.5999999642372131,
  0.40000003576278687,
  0.3999999761581421,
  0.40000003576278687,
  0.40000003576278687
 ],
 "table/[100,2]/render": [
  0.7000000476837158,
  0.5,
  0.5999999642372131,
  0.5,
  0.5
 ],
 "table/[50,2]/render": [
  0.5,
  0.30000001192092896,
  0.3999999761581421,
  0.3999999761581421,
  0.30000001192092896
 ],
 "table/[100,4]/removeAll": [
  0.3999999761581421,
  0.5,
  0.3999999761581421,
  0.40000003576278687,
  0.5
 ],
 "table/[50,4]/removeAll": [
  0.19999998807907104,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896,
  0.30000001192092896
 ],
 "table/[100,2]/removeAll": [
  0.20000004768371582,
  0.30000001192092896,
  0.3999999761581421,
  0.40000003576278687,
  0.40000003576278687
 ],
 "table/[50,2]/removeAll": [
  0.10000002384185791,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896,
  0.19999998807907104
 ],
 "table/[100,4]/sort/0": [
  0.699999988079071,
  0.5,
  0.6000000238418579,
  0.7999999523162842,
  0.5
 ],
 "table/[50,4]/sort/0": [
  0.30000001192092896,
  0.40000003576278687,
  0.3999999761581421,
  0.40000003576278687,
  0.3999999761581421
 ],
 "table/[100,2]/sort/0": [
  0.6000000238418579,
  0.6000000238418579,
  0.5,
  0.5,
  0.6000000238418579
 ],
 "table/[50,2]/sort/0": [
  0.3999999761581421,
  0.30000001192092896,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896
 ],
 "table/[100,4]/sort/1": [
  0.800000011920929,
  0.6000000238418579,
  0.699999988079071,
  0.5999999642372131,
  0.6000000238418579
 ],
 "table/[50,4]/sort/1": [
  0.30000001192092896,
  0.40000003576278687,
  0.40000003576278687,
  0.30000001192092896,
  0.30000001192092896
 ],
 "table/[100,2]/sort/1": [
  0.5,
  0.6000000238418579,
  0.5,
  0.5,
  0.6000000238418579
 ],
 "table/[50,2]/sort/1": [
  0.30000001192092896,
  0.40000003576278687,
  0.20000004768371582,
  0.30000001192092896,
  0.3999999761581421
 ],
 "table/[100,4]/filter/32": [
  0.30000001192092896,
  0.19999998807907104,
  0.30000001192092896,
  0.20000004768371582,
  0.19999998807907104
 ],
 "table/[50,4]/filter/32": [
  0.19999998807907104,
  0,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104
 ],
 "table/[100,2]/filter/32": [
  0.19999998807907104,
  0.19999998807907104,
  0.10000002384185791,
  0.20000004768371582,
  0.30000001192092896
 ],
 "table/[50,2]/filter/32": [
  0.19999998807907104,
  0.10000002384185791,
  0.10000002384185791,
  0.20000004768371582,
  0.19999998807907104
 ],
 "table/[100,4]/filter/16": [
  0.30000001192092896,
  0.19999998807907104,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896
 ],
 "table/[50,4]/filter/16": [
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0
 ],
 "table/[100,2]/filter/16": [
  0.2999999523162842,
  0.30000001192092896,
  0.20000004768371582,
  0.19999998807907104,
  0.30000001192092896
 ],
 "table/[50,2]/filter/16": [
  0.10000002384185791,
  0.09999996423721313,
  0.09999996423721313,
  0.10000002384185791,
  0.10000002384185791
 ],
 "table/[100,4]/filter/8": [
  0.2999999523162842,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.20000004768371582
 ],
 "table/[50,4]/filter/8": [
  0.20000004768371582,
  0.20000004768371582,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104
 ],
 "table/[100,2]/filter/8": [
  0.19999998807907104,
  0.10000002384185791,
  0.30000001192092896,
  0.19999998807907104,
  0.19999998807907104
 ],
 "table/[50,2]/filter/8": [
  0.10000002384185791,
  0.19999998807907104,
  0.19999998807907104,
  0.10000002384185791,
  0.09999996423721313
 ],
 "table/[100,4]/filter/4": [
  0.40000003576278687,
  0.30000001192092896,
  0.30000001192092896,
  0.3999999761581421,
  0.3999999761581421
 ],
 "table/[50,4]/filter/4": [
  0.2999999523162842,
  0.30000001192092896,
  0.10000002384185791,
  0.40000003576278687,
  0.19999998807907104
 ],
 "table/[100,2]/filter/4": [
  0.19999998807907104,
  0.30000001192092896,
  0.19999998807907104,
  0.2999999523162842,
  0.19999998807907104
 ],
 "table/[50,2]/filter/4": [
  0.19999998807907104,
  0.19999998807907104,
  0.30000001192092896,
  0.19999998807907104,
  0.19999998807907104
 ],
 "table/[100,4]/activate/32": [
  0.10000002384185791,
  0,
  0,
  0,
  0
 ],
 "table/[50,4]/activate/32": [
  0,
  0,
  0,
  0,
  0
 ],
 "table/[100,2]/activate/32": [
  0,
  0.09999996423721313,
  0,
  0,
  0
 ],
 "table/[50,2]/activate/32": [
  0.10000002384185791,
  0,
  0,
  0,
  0
 ],
 "table/[100,4]/activate/16": [
  0.10000002384185791,
  0,
  0,
  0.10000002384185791,
  0
 ],
 "table/[50,4]/activate/16": [
  0.10000002384185791,
  0.09999996423721313,
  0.10000002384185791,
  0,
  0
 ],
 "table/[100,2]/activate/16": [
  0,
  0.10000002384185791,
  0.10000002384185791,
  0,
  0
 ],
 "table/[50,2]/activate/16": [
  0.19999998807907104,
  0,
  0,
  0,
  0.09999996423721313
 ],
 "table/[100,4]/activate/8": [
  0,
  0,
  0.09999996423721313,
  0.10000002384185791,
  0
 ],
 "table/[50,4]/activate/8": [
  0,
  0,
  0,
  0,
  0
 ],
 "table/[100,2]/activate/8": [
  0,
  0,
  0.09999996423721313,
  0.10000002384185791,
  0
 ],
 "table/[50,2]/activate/8": [
  0,
  0,
  0,
  0,
  0
 ],
 "table/[100,4]/activate/4": [
  0,
  0.09999996423721313,
  0.10000002384185791,
  0.10000002384185791,
  0.10000002384185791
 ],
 "table/[50,4]/activate/4": [
  0,
  0.09999996423721313,
  0.09999996423721313,
  0,
  0
 ],
 "table/[100,2]/activate/4": [
  0.10000002384185791,
  0,
  0,
  0.10000002384185791,
  0
 ],
 "table/[50,2]/activate/4": [
  0.09999996423721313,
  0.10000002384185791,
  0,
  0.09999996423721313,
  0
 ],
 "anim/100/32": [
  0.09999996423721313,
  0.10000002384185791,
  0,
  0,
  0
 ],
 "anim/100/16": [
  0.09999996423721313,
  0,
  0,
  0,
  0
 ],
 "anim/100/8": [
  0.19999998807907104,
  0.10000002384185791,
  0.10000002384185791,
  0.10000002384185791,
  0.10000002384185791
 ],
 "anim/100/4": [
  0.20000004768371582,
  0.19999998807907104,
  0,
  0.09999996423721313,
  0.30000001192092896
 ],
 "tree/[500]/render": [
  2,
  4,
  2.899999976158142,
  2.399999976158142,
  1.5999999642372131
 ],
 "tree/[50,10]/render": [
  1.5,
  1.100000023841858,
  1.199999988079071,
  1.199999988079071,
  1.300000011920929
 ],
 "tree/[10,50]/render": [
  1,
  1.100000023841858,
  1,
  1,
  1
 ],
 "tree/[5,100]/render": [
  0.800000011920929,
  0.9000000357627869,
  1,
  0.6000000238418579,
  0.9000000357627869
 ],
 "tree/[2,2,2,2,2,2,2,2,2,2]/render": [
  5.400000035762787,
  2.800000011920929,
  4.199999988079071,
  2.800000011920929,
  4.399999976158142
 ],
 "tree/[500]/removeAll": [
  0.5,
  0.6000000238418579,
  0.5,
  0.5,
  0.6000000238418579
 ],
 "tree/[50,10]/removeAll": [
  0.6000000238418579,
  0.5,
  0.5999999642372131,
  0.5,
  0.5999999642372131
 ],
 "tree/[10,50]/removeAll": [
  0.5,
  0.5,
  0.5999999642372131,
  0.5,
  0.5
 ],
 "tree/[5,100]/removeAll": [
  0.5,
  0.699999988079071,
  0.7000000476837158,
  0.5,
  0.6000000238418579
 ],
 "tree/[2,2,2,2,2,2,2,2,2,2]/removeAll": [
  1.699999988079071,
  1.699999988079071,
  1.5,
  1.600000023841858,
  1.5999999642372131
 ],
 "tree/[500]/[reverse]": [
  2.300000011920929,
  1.399999976158142,
  1.300000011920929,
  1.300000011920929,
  1.2999999523162842
 ],
 "tree/[50,10]/[reverse]": [
  0.7000000476837158,
  0.800000011920929,
  0.6000000238418579,
  0.699999988079071,
  0.699999988079071
 ],
 "tree/[10,50]/[reverse]": [
  0.5999999642372131,
  0.6000000238418579,
  0.5,
  0.6000000238418579,
  0.5
 ],
 "tree/[5,100]/[reverse]": [
  0.5999999642372131,
  0.5,
  0.5999999642372131,
  0.5,
  0.7000000476837158
 ],
 "tree/[500]/[insertFirst(1)]": [
  0.2999999523162842,
  0.20000004768371582,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896
 ],
 "tree/[50,10]/[insertFirst(1)]": [
  0.20000004768371582,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104
 ],
 "tree/[10,50]/[insertFirst(1)]": [
  0.19999998807907104,
  0.10000002384185791,
  0.10000002384185791,
  0.10000002384185791,
  0.09999996423721313
 ],
 "tree/[5,100]/[insertFirst(1)]": [
  0.10000002384185791,
  0.09999996423721313,
  0.09999996423721313,
  0.09999996423721313,
  0.19999998807907104
 ],
 "tree/[500]/[insertLast(1)]": [
  0.2999999523162842,
  0.19999998807907104,
  0.2999999523162842,
  0.30000001192092896,
  0.19999998807907104
 ],
 "tree/[50,10]/[insertLast(1)]": [
  0.10000002384185791,
  0,
  0.09999996423721313,
  0,
  0
 ],
 "tree/[10,50]/[insertLast(1)]": [
  0.09999996423721313,
  0.09999996423721313,
  0.09999996423721313,
  0.09999996423721313,
  0.10000002384185791
 ],
 "tree/[5,100]/[insertLast(1)]": [
  0,
  0.19999998807907104,
  0.10000002384185791,
  0.20000004768371582,
  0.09999996423721313
 ],
 "tree/[500]/[removeFirst(1)]": [
  0.3999999761581421,
  0.30000001192092896,
  0.30000001192092896,
  0.30000001192092896,
  0.20000004768371582
 ],
 "tree/[50,10]/[removeFirst(1)]": [
  0.20000004768371582,
  0.10000002384185791,
  0.20000004768371582,
  0.2999999523162842,
  0.30000001192092896
 ],
 "tree/[10,50]/[removeFirst(1)]": [
  0.20000004768371582,
  0.20000004768371582,
  0.10000002384185791,
  0.19999998807907104,
  0.19999998807907104
 ],
 "tree/[5,100]/[removeFirst(1)]": [
  0.2999999523162842,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896,
  0.30000001192092896
 ],
 "tree/[500]/[removeLast(1)]": [
  0.19999998807907104,
  0.20000004768371582,
  0.10000002384185791,
  0.19999998807907104,
  0.10000002384185791
 ],
 "tree/[50,10]/[removeLast(1)]": [
  0.10000002384185791,
  0.19999998807907104,
  0.20000004768371582,
  0.19999998807907104,
  0.10000002384185791
 ],
 "tree/[10,50]/[removeLast(1)]": [
  0.10000002384185791,
  0.10000002384185791,
  0.20000004768371582,
  0.19999998807907104,
  0.19999998807907104
 ],
 "tree/[5,100]/[removeLast(1)]": [
  0.20000004768371582,
  0.30000001192092896,
  0.30000001192092896,
  0.09999996423721313,
  0.19999998807907104
 ],
 "tree/[500]/[moveFromEndToStart(1)]": [
  0.5,
  0.5,
  0.5,
  0.3999999761581421,
  0.40000003576278687
 ],
 "tree/[50,10]/[moveFromEndToStart(1)]": [
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.30000001192092896
 ],
 "tree/[10,50]/[moveFromEndToStart(1)]": [
  0.30000001192092896,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104,
  0.19999998807907104
 ],
 "tree/[5,100]/[moveFromEndToStart(1)]": [
  0.19999998807907104,
  0.30000001192092896,
  0.20000004768371582,
  0.20000004768371582,
  0.3999999761581421
 ],
 "tree/[500]/[moveFromStartToEnd(1)]": [
  0.5,
  0.5,
  0.40000003576278687,
  0.40000003576278687,
  0.3999999761581421
 ],
 "tree/[50,10]/[moveFromStartToEnd(1)]": [
  0.30000001192092896,
  0.30000001192092896,
  0.19999998807907104,
  0.19999998807907104,
  0.30000001192092896
 ],
 "tree/[10,50]/[moveFromStartToEnd(1)]": [
  0.10000002384185791,
  0.19999998807907104,
  0.30000001192092896,
  0.30000001192092896,
  0.10000002384185791
 ],
 "tree/[5,100]/[moveFromStartToEnd(1)]": [
  0.40000003576278687,
  0.19999998807907104,
  0.20000004768371582,
  0.19999998807907104,
  0.20000004768371582
 ],
 "tree/[500]/[kivi_worst_case]": [
  1.4000000357627869,
  1.699999988079071,
  1.5,
  1.5999999642372131,
  1.4000000357627869
 ],
 "tree/[500]/[snabbdom_worst_case]": [
  0.6000000238418579,
  0.3999999761581421,
  0.5,
  0.3999999761581421,
  0.5
 ],
 "tree/[500]/[react_worst_case]": [
  0.40000003576278687,
  0.3999999761581421,
  0.5,
  0.30000001192092896,
  0.5
 ],
 "tree/[500]/[virtual_dom_worst_case]": [
  0.5,
  0.40000003576278687,
  0.3999999761581421,
  0.40000003576278687,
  0.3999999761581421
 ],
 "tree/[10,10,10,10]/no_change": [
  0,
  0,
  0,
  0,
  0
 ],
 "tree/[2,2,2,2,2,2,2,2,2,2]/no_change": [
  0,
  0,
  0,
  0.10000002384185791,
  0
 ]
}

Summing them all up I get like ~850ms for Voby and ~180ms for Solid. So Voby seems a lot slower than Solid here.

But, the test is weird, it's giving me state wrapped in custom classes, which I can't reconcile with the store I have because custom classes are not supported. So I'm having to clone the whole thing into plain objects, and I suspect that could be the major problem behind this.

Solid isn't doing the cloning, but I'm not sure if it make sense, like how am I supposed to reconcile an array with a custom class? Like I'm not even sure if current Solid supports that anymore.

Anyway for what is worth that's the test. It looks like I would need to host this somewhere to submit a PR for the comparison table, but I don't think I care enough to do that.

fabiospampinato avatar Nov 02 '22 00:11 fabiospampinato

I've replaced deep JSON cloning with something more ad-hoc and we are down from ~850ms to ~500ms. So a good chunk of the overhead disappeared.

Still there's a lot left though, I'm not exactly sure where that's coming from 🤔 Maybe other custom classes still present in the object are still a problem since those won't get wrapped in proxies by the store.

fabiospampinato avatar Nov 02 '22 00:11 fabiospampinato

It could be that this benchmark flushes multiple updates synchronously and if that's the case Voby would be updating the DOM multiple times but React or Solid would only update it after all synchronous updates are processed, I think 🤔

This is potentially worth changing, and it should probably be changed regardless.

I don't know if that's the reason though, this benchmark seems hard to inspect.

fabiospampinato avatar Nov 18 '22 16:11 fabiospampinato

Reopening to remember myself to take a closer look at this, it shouldn't be meaningfully slower than Solid.

fabiospampinato avatar Mar 13 '23 19:03 fabiospampinato

Down from ~500ms to ~375ms on the last commit. Still some way to go potentially.

fabiospampinato avatar Apr 10 '23 05:04 fabiospampinato