Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Windows 7
Desktop
8 months ago
Test name Executions per second
classnames 1361886.1 Ops/sec
clsx 1837015.0 Ops/sec
Array based 1349662.6 Ops/sec
String based (return struct) 2407050.5 Ops/sec
String based (if-else struct) 2394683.0 Ops/sec
Entries, filter, map, join 2299711.0 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