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) 2611116.8 Ops/sec
classnames(obj) 2306977.0 Ops/sec
classnames(arr) 1815345.2 Ops/sec
clsx(str) 3450778.0 Ops/sec
clsx(obj) 2865285.0 Ops/sec
clsx(arr) 2796057.8 Ops/sec
classcat(str) 3180676.8 Ops/sec
classcat(obj) 3003178.2 Ops/sec
classcat(arr) 3310029.8 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)