Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36
Chrome 96
Windows
Desktop
3 years ago
Test name Executions per second
classcat(arr) 3256035.2 Ops/sec
classcat(obj) 4893178.5 Ops/sec
clsx(arr) 4406456.5 Ops/sec
clsx(obj) 5322430.5 Ops/sec
objstr(obj) 5152286.0 Ops/sec
arr.filter(Boolean).join(" ") 2660490.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classcat(arr)

  • classcat(obj)

  • clsx(arr)

  • clsx(obj)

  • objstr(obj)

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