Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
class 1180830.5 Ops/sec
function constructor 1187951.5 Ops/sec
object literal 1081398.5 Ops/sec
object literal & sum.call 1113326.1 Ops/sec
__proto__ 33421.3 Ops/sec
Object.create 13651.1 Ops/sec
Object.setPrototypeOf 8934.1 Ops/sec
Script Preparation code:
Tests:
  • class

  • function constructor

  • object literal

  • object literal & sum.call

  • __proto__

  • Object.create

  • Object.setPrototypeOf


;