Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
class 1762996.8 Ops/sec
function constructor 1754009.1 Ops/sec
object literal 1575967.0 Ops/sec
object literal & sum.call 1612581.4 Ops/sec
__proto__ 40965.4 Ops/sec
Object.create 16337.7 Ops/sec
Object.setPrototypeOf 10947.8 Ops/sec
Script Preparation code:
Tests:
  • class

  • function constructor

  • object literal

  • object literal & sum.call

  • __proto__

  • Object.create

  • Object.setPrototypeOf