Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118
Windows
Desktop
one year ago
Test name Executions per second
classnames(str) 3214682.2 Ops/sec
classnames(obj) 1389939.5 Ops/sec
classnames(arr) 1397258.6 Ops/sec
clsx(str) 3811643.0 Ops/sec
clsx(obj) 2548715.8 Ops/sec
clsx(arr) 2585907.2 Ops/sec
classcat(str) 5115068.5 Ops/sec
classcat(obj) 3057517.8 Ops/sec
classcat(arr) 3022757.5 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)