We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9da9080 + 11667ae commit 062c982Copy full SHA for 062c982
1 file changed
benchmark/bench.js
@@ -64,6 +64,17 @@ for (var i = 0; i < n; i++) {
64
65
// Run benchmarks
66
suite
67
+ .add("hand-written", function () {
68
+ n = buf.readUInt32LE(0);
69
+ const points = [];
70
+ for (var i = 0; i < n; i++) {
71
+ points.push({
72
+ x: buf.readUInt16LE(i * 6 + 0 + 4),
73
+ y: buf.readUInt16LE(i * 6 + 2 + 4),
74
+ z: buf.readUInt16LE(i * 6 + 4 + 4),
75
+ });
76
+ }
77
+ })
78
.add("binparse", function () {
79
const points = PointsParser.read(buf);
80
})
0 commit comments