Permalink
Browse files

Inlined longNeq; Additional cyclic checks, see 563; More profiling da…

…ta; Array abuse and varint optimization
  • Loading branch information...
dcodeIO committed Dec 16, 2016
1 parent 90b2012 commit 8f25377cf99036794ba13b160a5060f312d1a7e7
@@ -1,15 +1,11 @@
protobuf.js version: <fill in>
protobuf.js version: <please fill in>
### How to reproduce ###
<please describe the expected and actual behavior>
```js
<please add a code snippet>
<please provide a code snippet for reproduction>
```
### Expected behavior ###
<please describe>
### Actual behavior ###
<please describe>
```
<please paste the stack trace of the error if applicable>
```
@@ -19,7 +19,7 @@ if (process.execArgv.indexOf("--prof") < 0) {
fs.unlink(file);
});
console.log("generating profile (may take a while) ...");
child_process.execSync("node --prof --trace-deopt " + process.argv.slice(1).join(' '), {
var child = child_process.execSync("node --prof " + process.argv.slice(1).join(' '), {
cwd: process.cwd(),
stdio: 'inherit'
});
@@ -40,10 +40,17 @@ if (process.execArgv.indexOf("--prof") < 0) {
// Actual profiling code
var protobuf = require("..");
protobuf.util.codegen.verbose = true;
var root = protobuf.parse(fs.readFileSync(require.resolve("../bench/bench.proto")).toString("utf8")).root;
var Test = root.lookup("Test");
var data = require("../bench/bench.json");
// Alternative mapbox data
/* var root = protobuf.parse(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.proto")).toString("utf8")).root;
var Test = root.lookup("vector_tile.Tile");
var data = Test.decode(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.bin")));*/
var count = process.argv.length > 3 ? parseInt(process.argv[3], 10) : 10000000;
function setupBrowser() {
@@ -66,3 +73,4 @@ switch (process.argv[2]) {
Test.decode(buf);
break;
}
process.exit(0);
Oops, something went wrong.

0 comments on commit 8f25377

Please sign in to comment.