logoalt Hacker News

JimDabelltoday at 7:06 AM0 repliesview on HN

> $() CSS parsing and DOM traversal was way slower than querySelector or getElementById, both of which predate jquery by years.

You have that backwards – jQuery predates querySelector by years.

The reason why getElementById is fast is because it’s a simple key lookup.