Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Chrome 94
Windows
Desktop
3 years ago
Test name Executions per second
classcat(arr) 1801982.0 Ops/sec
classcat(obj) 2992190.5 Ops/sec
clsx(arr) 2429409.0 Ops/sec
clsx(obj) 3173308.0 Ops/sec
objstr(obj) 3125414.2 Ops/sec
arr.filter(Boolean).join(" ") 1398139.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classcat(arr)

  • classcat(obj)

  • clsx(arr)

  • clsx(obj)

  • objstr(obj)

  • arr.filter(Boolean).join(" ")