3 for (let v = val; v; v >>>= 1) c += v & 1;
4 return val * 2 + val / 2 + c;
8 constructor(x) { this._value = x; }
9 set value(x) { this._value = x; }
10 get value() { return this._value; }
13 set value(x) { super.value = x; }
14 get value() { return calc(super.value); }
17 const bench = (init, num) => {
19 for (let i = 0; i != num; ++i) arr.push(new B(init));
20 for (let i = 0; i != num; ++i) arr[i].value += i;
22 for (let i = 0; i != num; ++i) sum += arr[i].value;
26 bench(1 << 30, 10000);
28 bench(42.5e10, 10000);