Saturday, 1 March 2014

Perfomance Dart Vs Dart2JS vs JavaScript Managing the DOM

After the result seen in the other post I decided to write this post about the performance of the browsers managing the DOM.

As in the other post, I have written a Dart code for inserting and removing an input from the DOM. I tried to do it as easy as I can. These are  the source codes :






The result are these :

NUMBERCREATEDELETETOTAL
Dartium DART
13,714,478,18
23,754,488,23
33,844,548,38
43,744,568,3
53,764,58,26
63,844,628,46
73,624,688,3
83,975,329,29
94,034,989,01
103,714,498,2
AVERAGE3,7974,6648,461
Chrome Dart2JS
10,244,354,59
20,253,824,07
30,243,633,87
40,233,563,79
50,243,693,93
60,244,334,57
70,254,044,29
80,243,623,86
90,243,84,04
100,243,733,97
AVERAGE0,2413,8574,098
Firefox Dart2JS
10,2621,7321,99
20,2221,4221,64
30,2320,9621,19
40,2322,9423,17
50,2321,4121,64
60,2320,6720,9
70,2320,8321,06
80,2320,6320,86
90,2320,9421,17
100,2320,7420,97
AVERAGE0,23221,22721,459
IE Dart2JS
10,9120,6621,57
20,9520,9621,91
30,9620,7821,74
4121,1222,12
50,8922,2123,1
60,9623,9624,92
71,0325,426,43
81,0123,224,21
91,0222,6923,71
101,0223,924,92
AVERAGE0,97522,48823,463



NUMBERCREATEDELETETOTAL
Chrome JS
10,230,030,26
20,280,040,32
30,280,030,31
40,270,030,3
50,260,030,29
60,280,040,32
70,270,040,31
80,290,030,32
90,290,030,32
100,270,040,31
AVERAGE0,2720,0340,306
Firefox JS
10,230,20,43
20,210,20,41
30,210,20,41
40,210,20,41
50,210,20,41
60,210,20,41
70,210,20,41
80,210,20,41
90,210,20,41
100,210,20,41
AVERAGE0,2120,20,412
IE JS
10,9345,846,73
20,9846,1947,17
30,9846,2947,27
40,9745,9246,89
50,9845,8246,8
60,9746,2947,26
70,9648,1549,11
81,0547,7548,8
90,9645,8546,81
100,9847,0248
AVERAGE0,97646,50847,484

The conclusions are weird this time:

  • The code converted from Dart to JS is lot of times slower than the JS, instead  in Internet Explorer that is 50% faster.
  • Firefox has the same problem with the converted code that had in the previous post.
  • Chrome is the faster in all the cases.
  • Creating things in the DOM is faster than deleting them, instead in Chrome and Firefox with JS.

No comments:

Post a Comment