Tests:
  • 1

    AخA
     
    function t() {
      const h = {
        a: null,
        b: null,
      };
      
      h.a = Math.random();
      h.b = Math.floor(Math.random() * 1200);
      
      return h;
      
    }
  • 2

     
    function t() {
      const a = Math.random();
      const b = Math.floor(Math.random() * 1200);
      
      return { a, b };
      
    }
  • 3

     
    function t() {
      return { a: Math.random(), b: Math.floor(Math.random() * 1200) };
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    1
    2
    3

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
Safari 14 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
1 289567616.0 Ops/sec
2 317021280.0 Ops/sec
3 322383584.0 Ops/sec