Class count on single element performance
JavaScript performance comparison
Preparation code
<div id="single-class" class="active"></div>
<div id="some-classes" class="active green blue mixed"></div>
<div id="multiple-classes" class="active green blue mixed effect level worried drop alert branch spoon obnoxious dreary account gratis successful chess dry squash check cure knee electric destroy introduce average decide fluttering bells wonderful drain plant celery spare berry recognise wilderness gray juicy grieving repulsive redundant fear whispering month coil mundane rake bare price ceaseless action lettuce one second bruise truthful doll petite stay mourn chubby back coach guide astonishing needy mother faithful cumbersome icicle gainful supply mighty grate irritating abusive strange rod heal"></div>
Preparation code output
<div id="single-class" class="active"></div>
<div id="some-classes" class="active green blue mixed"></div>
<div id="multiple-classes" class="active green blue mixed effect level worried drop alert branch spoon obnoxious dreary account gratis successful chess dry squash check cure knee electric destroy introduce average decide fluttering bells wonderful drain plant celery spare berry recognise wilderness gray juicy grieving repulsive redundant fear whispering month coil mundane rake bare price ceaseless action lettuce one second bruise truthful doll petite stay mourn chubby back coach guide astonishing needy mother faithful cumbersome icicle gainful supply mighty grate irritating abusive strange rod heal"></div>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
Single class attached to single element
|
|
pending… |
4 classes attached to single element
|
|
pending… |
80 classes attached to single element
|
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit
to the URL.
0 Comments