cheeriojs/cheerio — pull request #453 by kpdecker (2014-04-18 06:12:41+00:00)
Title: Perform manual string parsing for hasClass

This is faster and avoids additional memory pressure from temporary array objects.

Test: attributes - Has class (file: jquery.html)
cheerio x 46,072 ops/sec ±15.20% (61 runs sampled)
old x 4,477 ops/sec ±19.32% (46 runs sampled)
jsdom x 3,123 ops/sec ±2.84% (89 runs sampled)
Fastest: cheerio