Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
_.orderBy asc 22.0 Ops/sec
array.prototype.sort asc 31.3 Ops/sec
_.orderBy desc 35.7 Ops/sec
array.prototype.sort desc 23.0 Ops/sec
array.prototype.sort desc + check type 9.9 Ops/sec
array.prototype.sort asc + check type 10.5 Ops/sec
_.orderBy asc st 7.0 Ops/sec
_.orderBy desc st 8.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • _.orderBy asc

  • array.prototype.sort asc

  • _.orderBy desc

  • array.prototype.sort desc

  • array.prototype.sort desc + check type

  • array.prototype.sort asc + check type

  • _.orderBy asc st

  • _.orderBy desc st