Better HN
topnewbestaskshowjobs
Log inSign up

lrtz

15 karma · joined Jul 17, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

There's big performance downside replacing classes with attributes at least when using javascript query selectors.

Browsers have special data structures for id and class search optimizations.

Matching attributes scans through the dom top down.