| function assert(b, m = "") { |
| throw new Error("Bad: " + m); |
| for (let p of Object.keys(getOps)) { |
| let endOfCall = getOps[p] === 1 ? ");" : ", true);"; |
| (function ${p}(dv, index) { |
| return dv.${p}(index${endOfCall} |
| for (let p of Object.keys(setOps)) { |
| let endOfCall = setOps[p] === 1 ? ");" : ", true);"; |
| (function ${p}(dv, index, value) { |
| dv.${p}(index, value${endOfCall} |
| let ab = new ArrayBuffer(size); |
| let dv = new DataView(ab); |
| for (let i = 0; i < 100000; ++i) { |
| let index = (Math.random() * size) >>> 0; |
| index = Math.max(index - 8, 0); |
| for (let f of getFuncs) { |
| for (let f of setFuncs) { |