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
classnames(str) 2578658.0 Ops/sec
classnames(obj) 2175511.2 Ops/sec
classnames(arr) 1760357.5 Ops/sec
clsx(str) 3709371.5 Ops/sec
clsx(obj) 3194697.0 Ops/sec
clsx(arr) 3163562.0 Ops/sec
classcat(str) 4160109.8 Ops/sec
classcat(obj) 3536597.0 Ops/sec
classcat(arr) 3579052.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)