Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
clsx str + obj 5259884.0 Ops/sec
clsx str + cond 4048492.5 Ops/sec
Array based 2913416.5 Ops/sec
String based (return struct) 3971105.0 Ops/sec
String based (if-else struct) 4006068.2 Ops/sec
Entries, filter, map, join 3429324.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • clsx str + obj

  • clsx str + cond

  • Array based

  • String based (return struct)

  • String based (if-else struct)

  • Entries, filter, map, join


;