Concatinated CSS class vs multiple CSS classes (v5)

Revision 5 of this benchmark created on


Preparation HTML

<style rel='stylesheet'>
  .test1a { color: #f66; }
  .test1b { font-weight: bold; }
  .test2 { color: #f66; font-weight: bold; }
</style>

Setup

var node = document.createElement('div');

Teardown



            document.body.removeChild(node);
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
Multiple CSS classes
node.className = 'test1a test1b';
document.body.appendChild(node);
ready
Single CSS class
node.className = 'test2';
document.body.appendChild(node);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.