Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
Opera 95
Windows 7
Desktop
8 months ago
Test name Executions per second
classnames 932530.2 Ops/sec
clsx 1344273.8 Ops/sec
Array based 1001473.0 Ops/sec
String based (return struct) 1372157.6 Ops/sec
String based (if-else struct) 1428315.1 Ops/sec
Entries, filter, map, join 1296975.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classnames

  • clsx

  • Array based

  • String based (return struct)

  • String based (if-else struct)

  • Entries, filter, map, join