perf (v4)

Revision 4 of this benchmark created on


Preparation HTML

<nav class="feds-breadcrumbs" aria-label="Breadcrumb">
  <ul>
    <li><a href="https://www.google.com">Home</a></li>
    <li><a href="https://www.google.com/products/catalog.html">Products</a></li>
    <li><a href="https://www.google.com/products/photoshop.html">Photoshop</a></li>
    <li aria-current="page"><a href="https://www.google.com/education.html">Education</a></li>
  </ul>
</nav>

Test runner

Ready to run.

Testing in
TestOps/sec
Replace
let breadcrumbs = document.querySelector('nav.feds-breadcrumbs').textContent;
breadcrumbs = breadcrumbs.replace(/ /g, '').replace(/(\r\n|\n|\r)/gm, '');
ready
ForEach
let val = '';
[...document.querySelector('nav.feds-breadcrumbs')?.children].forEach((el) => {
	val += el.textContent.replace(/ /g, '').replace(/(\r\n|\n|\r)/gm, '');
});
ready

Revisions

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