HTML Preparation code:
AخA
 
1
<div class='lazyload'></div>
Script Preparation code:
 
var e = document.querySelector(".lazyload");
Tests:
  • Case 1

    x
     
    if (e.className === "lazyload") {
      e.classList.remove("lazyload");
      e.classList.add("lazyloading");
    }
  • Case 2

     
    if (e.className === "lazyload") {
      e.className =   e.className.replace(
        "lazyload",
        "lazyloading"
      );
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Case 1
    Case 2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.41
Chrome 85 on Windows
View result in a separate tab
Test name Executions per second
Case 1 10215353.0 Ops/sec
Case 2 10285225.0 Ops/sec