Skip to content

Instantly share code, notes, and snippets.

View webNeat's full-sized avatar

Amine Ben hammou webNeat

View GitHub Profile
@webNeat
webNeat / reflect-vs-private.js
Last active January 31, 2022 18:06 — forked from Aschen/reflect.js
Reflect.defineProperty vs #field
/**
$ node node/reflect-vs-private.js
Reflect x 7,297,368 ops/sec ±0.66% (92 runs sampled)
Normal x 126,613,750 ops/sec ±0.75% (93 runs sampled)
Private x 14,083,334 ops/sec ±0.99% (87 runs sampled)
Fastest is Normal
*/
const { Benchmark } = require("benchmark");
var suite = new Benchmark.Suite();