Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
clsx str + obj 2653965.0 Ops/sec
clsx str + cond 2183109.2 Ops/sec
Array based 1166890.0 Ops/sec
String based (return struct) 2089938.9 Ops/sec
String based (if-else struct) 2090483.2 Ops/sec
Entries, filter, map, join 1751270.6 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


;