Comment

Comment by rudian

Please don't listen to this, it's misleading.

querySelector *does not* take 62ms to run. Both of them take 0.01ms at most, try it yourself. This is the sort of micro optimization you should not concern yourself with.

How often do you need to select unique elements by ID? Don't use IDs in the first place.

This is akin to using `i--` in loops to "speed up your code" — we're past that.

parent rudian 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton