Run details:
Mozilla/5.0 (Linux; Android 10; SM-G960F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36
Chrome Mobile 88
Android
Mobile
4 months ago
Test name Executions per second
classnames 3037730.2 Ops/sec
clsx 4018940.8 Ops/sec
Array based 3236342.0 Ops/sec
String based (return struct) 4094373.8 Ops/sec
String based (if-else struct) 4098039.2 Ops/sec
Entries, filter, map, join 3730963.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