Skip to content

Commit

Permalink
Benchmark: update to binparse@2
Browse files Browse the repository at this point in the history
  • Loading branch information
screeny05 committed Nov 22, 2023
1 parent 215959f commit d24d56b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
14 changes: 7 additions & 7 deletions benchmark/bench.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Benchmark = require("benchmark");
const bp = require("binparse").bp;
const Parser = require("../dist/binary_parser").Parser;
const Destruct = require("destruct-js");
const Struct = require("structron");
import Benchmark from "benchmark";
import { bp } from "binparse";
import { Parser } from "../dist/binary_parser.js";
import Destruct from "destruct-js";
import Struct from "structron";

const suite = new Benchmark.Suite();

Expand All @@ -14,8 +14,8 @@ const PointParser = bp.object("Point", {
});

const PointsParser = bp.object("SimpleObject", {
length: bp.variable("len", bp.lu32),
points: bp.array("Points", PointParser, "len"),
length: bp.lu32,
points: bp.array("Points", PointParser, "length"),
});

// binary-parser
Expand Down
31 changes: 17 additions & 14 deletions benchmark/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"dependencies": {
"benchmark": "^2.1.4",
"binparse": "1.2.1",
"destruct-js": "^0.2.9",
"binparse": "^2.1.0",
"destruct-js": "^0.2.13",
"structron": "^0.4.3"
}
},
"type": "module"
}

0 comments on commit d24d56b

Please sign in to comment.