Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15
Safari 18
Mac OS X 10.15.7
Desktop
one year ago
Benchmark.js
Node.contains()
2.0M/s
jQuery.contains()
1.4M/s
View exact numbers
Test name Executions per second
Node.contains() 1,970,338 Ops/sec
jQuery.contains() 1,382,598 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: