Run details:
Mozilla/5.0 (Android 10; Mobile; rv:85.0) Gecko/85.0 Firefox/85.0
Firefox Mobile 85
Android
Mobile
4 years ago
Test name Executions per second
1 517653984.0 Ops/sec
2 529162592.0 Ops/sec
3 532078112.0 Ops/sec
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.flooe(Math.random() * 1200);
      
      return { a, b };
      
    }
  • 3

     
    function t() {
      const h = {
        a: null,
        b: null,
      };
      
      a = Math.random();
      b = Math.floor(Math.random() * 1200);
      
      return Object.assign(h, {a,b});
      
    }