Storing IDs Manually Is Faster Than getElementById

Comments

I always assumed getElementById, being native code, is faster than any “manual” implementation where you manually store all the IDs in a JS map. This JSPerf says it’s not true.

Comments