Browser performance results from P4 2400MHz CPU, 512MB RAM, Windows 2000. Numbers are in milliseconds.
Last update: Nov 10 2004.
| Test |
IE 6 SP1 |
Firefox 1.0 |
| DOM - Create and append |
31 |
125 |
| DOM - Get elements by id |
328 |
219 |
| DOM - Assign a class |
15 |
109 |
| DOM - Assign HTML |
265 |
313 |
| DOM - Change background |
32 |
141 |
| DOM - Remove first child |
62 |
78 |
| DOM - Change display to inline |
32 |
235 |
| DOM - Clone and append |
93 |
141 |
| DOM - Get offsetWidth |
281 |
15 |
| DOM - Assign onclick |
16 |
31 |
| DOM - Set attribute |
15 |
32 |
| DOM - Remove attribute |
16 |
16 |
| Core - Empty loop |
39 |
24 |
| Core - Object creation |
149 |
180 |
| Core - Date creation |
274 |
2664 |
| Core - Function declaration |
8 |
125 |
| Core - Simple negative condition |
78 |
63 |
| Core - Array creation |
172 |
320 |
| Core - Array population |
86 |
63 |
| Core - Array sort |
63 |
24 |
| Core - Implicit string conversion |
109 |
24 |
| Core - String concatenation |
40 |
0 |
| Core - String indexOf |
47 |
110 |
| Core - Regexp test |
55 |
86 |
| Core - Regexp replace |
110 |
492 |
| Core - Random |
24 |
86 |
| Core - Modulos |
133 |
32 |
| Core - Dec to Oct |
63 |
172 |
| Core - Hex to Dec with parseInt |
47 |
63 |
DOM tests measured each listed operation on 800 elements.
Core tests ran each listed operation 20,000 times, with few exceptions.