HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
 
/*your preparation JavaScript code goes here
To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/
async function globalMeasureThatScriptPrepareFunction() {
    // This function is optional, feel free to remove it.
    // await someThing();
}
Tests:
  • direct access

    x
     
    const bigObject = {
      // primitives
      key1: 42,
      key2: "hello",
      key3: true,
      key4: null,
      key5: undefined,
      key6: 3.14,
      
      // nested objects
      key7: { a: 1, b: 2 },
      key8: { nested: { deeper: "value" } },
      key9: { x: "foo", y: "bar" },
      
      // arrays
      key10: [1, 2, 3],
      key11: ["a", "b", "c"],
      key12: [true, false, true],
      
      // functions (methods)
      key13: function () { return "method13"; },
      key14: () => "method14",
      
      // more primitives and mixtures
      key15: "world",
      key16: 0,
      key17: false,
      key18: "sample",
      key19: 100,
      key20: [4, 5, 6],
      
      // additional nested objects
      key21: { name: "Alice", age: 30 },
      key22: { x: [1,2], y: { z: "end" } },
      key23: { flag: true },
      
      // more arrays
      key24: ["x", "y", "z"],
      key25: [7, 8, 9],
      
      // more functions
      key26: function () { return this.key2; },
      key27: () => 27,
      
      // additional primitive values
      key28: "test",
      key29: 999,
      key30: false
    };
    const a = bigObject.key1;
    const b = bigObject.key2;
    const c = bigObject.key3;
    const d = bigObject.key4;
    const e = bigObject.key5;
    const f = bigObject.key6;
    const g = bigObject.key7;
    const h = bigObject.key8;
    const i = bigObject.key9;
    const j = bigObject.key10;
    const k = bigObject.key11;
    const l = bigObject.key12;
    const m = bigObject.key13;
    const n = bigObject.key14;
    const o = bigObject.key15;
    const p = bigObject.key16;
    const q = bigObject.key17;
    const r = bigObject.key18;
    const s = bigObject.key19;
    const t = bigObject.key20;
    const u = bigObject.key21;
    const v = bigObject.key22;
    const w = bigObject.key23;
    const x = bigObject.key24;
    const y = bigObject.key25;
    const z = bigObject.key26; 
    const aa = bigObject.key27;
    const bb = bigObject.key28;
    const cc = bigObject.key29;
    const dd = bigObject.key30;
  • destructuringTest

     
    const bigObject = {
      // primitives
      key1: 42,
      key2: "hello",
      key3: true,
      key4: null,
      key5: undefined,
      key6: 3.14,
      
      // nested objects
      key7: { a: 1, b: 2 },
      key8: { nested: { deeper: "value" } },
      key9: { x: "foo", y: "bar" },
      
      // arrays
      key10: [1, 2, 3],
      key11: ["a", "b", "c"],
      key12: [true, false, true],
      
      // functions (methods)
      key13: function () { return "method13"; },
      key14: () => "method14",
      
      // more primitives and mixtures
      key15: "world",
      key16: 0,
      key17: false,
      key18: "sample",
      key19: 100,
      key20: [4, 5, 6],
      
      // additional nested objects
      key21: { name: "Alice", age: 30 },
      key22: { x: [1,2], y: { z: "end" } },
      key23: { flag: true },
      
      // more arrays
      key24: ["x", "y", "z"],
      key25: [7, 8, 9],
      
      // more functions
      key26: function () { return this.key2; },
      key27: () => 27,
      
      // additional primitive values
      key28: "test",
      key29: 999,
      key30: false
    };
    const {
        key1, key2, key3, key4, key5, key6,
        key7, key8, key9, key10, key11, key12,
        key13, key14, key15, key16, key17, key18,
        key19, key20, key21, key22, key23, key24,
        key25, key26, key27, key28, key29, key30
      } = bigObject;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    direct access
    destructuringTest

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
direct access 12369508.0 Ops/sec
destructuringTest 12338572.0 Ops/sec