Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Windows
Desktop
8 months ago
Test name Executions per second
classnames(str) 7728715.5 Ops/sec
classnames(obj) 6673378.5 Ops/sec
classnames(arr) 5213143.5 Ops/sec
clsx(str) 11117119.0 Ops/sec
clsx(obj) 9594774.0 Ops/sec
clsx(arr) 9664315.0 Ops/sec
classcat(str) 12169326.0 Ops/sec
classcat(obj) 10360591.0 Ops/sec
classcat(arr) 10578697.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)