Run details:
Mozilla/5.0 (Linux; Android 9; Fire) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Safari/537.36
Chrome 89
Android
Desktop
3 years ago
Test name Executions per second
classnames 91290.3 Ops/sec
clsx 130360.6 Ops/sec
Array based 103148.9 Ops/sec
String based (return struct) 148584.8 Ops/sec
String based (if-else struct) 149445.6 Ops/sec
Entries, filter, map, join 113389.1 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