contact or setAttribute

Benchmark created by textContent on


Test runner

Ready to run.

Testing in
TestOps/sec
setAttribute
var div = document.createElement('div');
div.setAttribute('style', 'color:#06C;font-weight:800;');
div.innerHTML = '123' + '<div style="color:#060;">123</div>';
 
ready
contact
var div = document.createElement('div');
div.innerHTML = '<div style="font-weight:800;color:#06C;">123</div>' +  '<div style="color:#060;font-weight:800;">123</div>';
ready

Revisions

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

  • Revision 1: published by textContent on