JSベンチ実測MEASURED, NOT RECALLED

    ↑↓ で選択、Enter で開く。Esc で閉じる。

    Home / Findings

    `Float64Array` sums about as fast as a plain array (6% gap)

    Typed arrays are sold on memory efficiency, but a straight summing loop shows only a 6% speed difference.

    Result

    Runplain array`Float64Array`Ratio
    Run 12.0472.2470.91×
    Run 22.0672.1820.95×
    Run 32.1192.1970.96×

    Median spread: plain array CV 1.5% / `Float64Array` CV 1.3% / Ratio CV 2.4% (computed from the 3 runs)

    Conditions

    Summing 1,000,000 elements, five times.

    Where this number does not apply

    Larger inputs, write-heavy workloads, or operations like sort may flip it. We do not treat this 6% as a selling point.

    Reproduce

    cd bench
    node --expose-gc micro-fixed.mjs --out ../data/run.json --samples 21

    Run it three times on the same machine; if the spread of median stays under 10%, you should land on the same conclusion. If your numbers disagree, tell us and we will retract.