Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
classnames(str) 5096493.5 Ops/sec
classnames(obj) 4639495.0 Ops/sec
classnames(arr) 4026688.2 Ops/sec
clsx(str) 7340893.0 Ops/sec
clsx(obj) 6434595.0 Ops/sec
clsx(arr) 6493352.5 Ops/sec
classcat(str) 8384109.5 Ops/sec
classcat(obj) 6952119.0 Ops/sec
classcat(arr) 7102447.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classnames(str)

  • classnames(obj)

  • classnames(arr)

  • clsx(str)

  • clsx(obj)

  • clsx(arr)

  • classcat(str)

  • classcat(obj)

  • classcat(arr)