Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Safari 5 runs
Function Prototype
2.5M/s
ES6 Class
2.1M/s
Object Literal
1.2M/s

Fastest: Function Prototype (2.1x faster)

View exact numbers
  • Function Prototype: 2,535,138 ops/sec
  • ES6 Class: 2,141,070 ops/sec
  • Object Literal: 1,231,976 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    ES6 Class
    Function Prototype
    Object Literal
    Basic function
    Basic functions with object destructuring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15
Safari 17 on Mac OS X 10.15.7
View result in a separate tab
Basic function
65.4M/s
Basic functions with object destructuring
63.6M/s
Function Prototype
4.1M/s
ES6 Class
3.5M/s
Object Literal
2.4M/s
View exact numbers
Test name Executions per second
Basic function 65,396,164 Ops/sec
Basic functions with object destructuring 63,556,236 Ops/sec
Function Prototype 4,096,838 Ops/sec
ES6 Class 3,524,369 Ops/sec
Object Literal 2,365,983 Ops/sec