Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Windows
Desktop
2 years ago
Test name Executions per second
classnames string 2902630.5 Ops/sec
clsx string 6313313.5 Ops/sec
classnames object 2665690.0 Ops/sec
clsx object 3557924.2 Ops/sec
classnames array 1711824.9 Ops/sec
clsx array 3808581.0 Ops/sec
Fast-ClassNames string 2768156.2 Ops/sec
Fast-ClassNames object 2920690.8 Ops/sec
Fast-ClassNames array 2249122.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classnames string

  • clsx string

  • classnames object

  • clsx object

  • classnames array

  • clsx array

  • Fast-ClassNames string

  • Fast-ClassNames object

  • Fast-ClassNames array