Jason Knight
May 20, 2023

--

My bad, first time using jsperf.app -- is this by the same folks of the old JSPerf that vanished like five or six years ago?

Don't like that "publish" distinction... but anyhow I forgot to purge the UL so it got bigger and bigger, meaning each test was slower than the last. Doh.

I though the results looked wrong. Here's a better version.

Results are much more inline with what I expected. I knew that other one didn’t look right. For..of having no reason to suck like it does, other than zero efforts going into optimizing it whilst endless effort is dumped into Array.forEach which even so remains garbage compared to the old-school loop.

Of course DOM walking is off the cuff.

--

--

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

Responses (1)