Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
classnames(str) 6589316.0 Ops/sec
classnames(obj) 5644297.0 Ops/sec
classnames(arr) 4519430.0 Ops/sec
clsx(str) 8314729.5 Ops/sec
clsx(obj) 7274078.0 Ops/sec
clsx(arr) 7406326.5 Ops/sec
classcat(str) 10070604.0 Ops/sec
classcat(obj) 8053232.0 Ops/sec
classcat(arr) 8198560.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)