Jason Knight
1 min readAug 19, 2021

--

You've got some flaws in your methodology and failings in your results.

First off you're only testing the scripting execution time. That means you failed to take into account the parser and rendering stages that do NOT fire until you release execution or try reading specific properties of elements you've generated.

Next you're using date instead of performance. The lower granularity is likely biting you.

You also run them all in the same page, which means results caching, memory thrashing, garbage collection, etc, etc, could screw with your results. Try swapping their execution orders to see what I mean. You'll find the order you run them in messes with your results.

Finally you've got all that functional programming nonsense adding massive amounts of overhead in the terms of "functions for NOTHING", mated to shoe-horning the DOM techniques into matching the behavior / calling method of the markup driven ones. This greatly neuters the Node version's efficiency.

That first one though is the big sticking point. It really means none of your comparisons are meaningful.

--

--

Jason Knight
Jason Knight

Written by Jason Knight

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

Responses (1)