上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 494 下一页
摘要: Benchmark: 查看代码 import {createBenchmark} from './benchmark'; const ARRAY_SIZE = 10000; const array1 = []; // {value,prop_0}, {value,prop_0}, {value,pr 阅读全文
posted @ 2023-11-11 20:58 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: https://www.npmjs.com/package/ses Lockdown The lockdown() function also tames some objects including regular expressions, locale methods, and errors. 阅读全文
posted @ 2023-11-08 03:31 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-11-08 02:50 Zhentiw 阅读(45) 评论(0) 推荐(0)
摘要: const COUNT = Number.parseInt(process.argv[2] || "10"); console.log(`Running ${COUNT} iterations.`); let value = 0; export function benchA() { value = 阅读全文
posted @ 2023-11-06 15:28 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: Concurrency + Channel (CSP): Concurrency is a way to run operation in isolated thread, a way to better utilize the CPU resources and handle multi simu 阅读全文
posted @ 2023-10-31 15:10 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: function getData(d) { setTimeout(() => { if (typeof d "number") { run.next(d/2) } else { run.next(d) } }, 500) } function* gen() { var x = 1 + (yield 阅读全文
posted @ 2023-10-26 14:43 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要: Table of Content Introudction to VMs CPU - Understanding the Pysical Machine VMs - Arrays, Objects, functions, prototype chains DepotExplorer: collect 阅读全文
posted @ 2023-10-24 15:01 Zhentiw 阅读(44) 评论(0) 推荐(0)
摘要: Thunks Sync thunk: A blocker of code which has everything ready and can return the value directly. function add(x, y) { return x + y } const thunk = f 阅读全文
posted @ 2023-10-18 14:52 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: An example of callback implemnetation for handling async flow: function fakeAjax(url, cb) { var fake_responses = { file1: "The first text", file2: "Th 阅读全文
posted @ 2023-10-17 15:03 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: Let's say you're creating a component that has all the props of input but needs to add a label prop. You'll need to extend from the ComponentProps typ 阅读全文
posted @ 2023-10-10 14:59 Zhentiw 阅读(20) 评论(0) 推荐(0)
上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 494 下一页