Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42
Chrome 106
Windows
Desktop
2 years ago
Test name Executions per second
classnames(str) 2675373.8 Ops/sec
classnames(obj) 2386639.2 Ops/sec
classnames(arr) 1925372.5 Ops/sec
clsx(str) 3659045.0 Ops/sec
clsx(obj) 3228249.2 Ops/sec
clsx(arr) 3209964.2 Ops/sec
classcat(str) 3965307.0 Ops/sec
classcat(obj) 3453303.2 Ops/sec
classcat(arr) 3369823.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)