随笔分类 - VM
摘要:What is holey array: an array with hole(s) const array = [1,2, ,3] Why this is a problem? Should array[2] to be undefined? Yes and no.. normally it is
阅读全文
摘要:import { createBenchmark } from "./benchmark"; class MyArray extends Array {} const SIZE = 100; const obj: Record<string, number> = {}; /** * { * _0:
阅读全文
摘要:Benchmark: 查看代码 import {createBenchmark} from './benchmark'; const ARRAY_SIZE = 10000; const array1 = []; // {value,prop_0}, {value,prop_0}, {value,pr
阅读全文
摘要:When you create a object, in V8, it creates a hidden class to repesent the object shape. Two different objects with same object shape might share the
阅读全文
摘要:const COUNT = Number.parseInt(process.argv[2] || "10"); console.log(`Running ${COUNT} iterations.`); let value = 0; export function benchA() { value =
阅读全文
摘要:Table of Content Introudction to VMs CPU - Understanding the Pysical Machine VMs - Arrays, Objects, functions, prototype chains DepotExplorer: collect
阅读全文