Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
classnames(str) 5312188.5 Ops/sec
classnames(obj) 4702283.5 Ops/sec
classnames(arr) 3987965.0 Ops/sec
clsx(str) 7570055.0 Ops/sec
clsx(obj) 6568385.5 Ops/sec
clsx(arr) 6669043.5 Ops/sec
classcat(str) 8740513.0 Ops/sec
classcat(obj) 7221874.0 Ops/sec
classcat(arr) 7392744.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)