HTML Preparation code:
Tests:

Historical Performance Data aggregated from 11 community runs

Desktop Results:
Chrome 11 runs
matches
36K/s
classList
31K/s
closest
30K/s
matches with more complex selector
17K/s

Fastest: matches (2.2x faster)

View exact numbers
  • matches: 36,387 ops/sec
  • classList: 31,273 ops/sec
  • closest: 29,625 ops/sec
  • matches with more complex selector: 16,741 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    matches
    closest
    classList
    matches with more complex selector

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Chrome 143 on Windows
View result in a separate tab
classList
21K/s
matches
16K/s
closest
13K/s
matches with more complex selector
8K/s
View exact numbers
Test name Executions per second
classList 20,709 Ops/sec
matches 16,441 Ops/sec
closest 12,898 Ops/sec
matches with more complex selector 7,602 Ops/sec