Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
Firefox 87
Ubuntu
Desktop
3 years ago
Test name Executions per second
classnames 1154890.4 Ops/sec
clsx 2114334.2 Ops/sec
Array based 932604.6 Ops/sec
String based (return struct) 1574297.9 Ops/sec
String based (if-else struct) 1539247.9 Ops/sec
Entries, filter, map, join 1670352.9 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


;