Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0
Firefox 112
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
classnames 2712601.2 Ops/sec
clsx 3774720.8 Ops/sec
Array based 3063286.8 Ops/sec
String based (return struct) 4759017.0 Ops/sec
String based (if-else struct) 4758655.5 Ops/sec
Entries, filter, map, join 4490564.5 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