Skip to content

Conversation

@zertosh
Copy link
Contributor

@zertosh zertosh commented Aug 23, 2015

The "Serializing source map" benchmark time was cut in half. About half of those gains are from reducing the calls to util.toSetString in ArraySet, the other half is from removing the duplicate calls to indexOf.

Before:

❯ node bench-shell-bindings.js
Parsing source map
iteration: 5080ms
iteration: 4665ms
iteration: 5053ms
iteration: 4730ms
iteration: 4986ms
{ unit: 'ms', x2: 120325071, x1: 24513, x0: 5 }

Serializing source map
iteration: 8028ms
iteration: 8019ms
iteration: 7959ms
{ unit: 'ms', x2: 192098826, x1: 24006, x0: 3 }

After:

❯ node bench-shell-bindings.js
Parsing source map
iteration: 4951ms
iteration: 4692ms
iteration: 4969ms
iteration: 4765ms
iteration: 5050ms
{ unit: 'ms', x2: 119416422, x1: 24426, x0: 5 }

Serializing source map
iteration: 3915ms
iteration: 3843ms
iteration: 3778ms
iteration: 3766ms
iteration: 3943ms
iteration: 4147ms
{ unit: 'ms', x2: 91296772, x1: 23392, x0: 6 }

@fitzgen
Copy link
Contributor

fitzgen commented Aug 25, 2015

Looks great! Thanks! I'm just going to run the benchmarks locally, real quick.

@fitzgen
Copy link
Contributor

fitzgen commented Aug 25, 2015

Very nice :)

fitzgen added a commit that referenced this pull request Aug 25, 2015
Improve source-map serialization performance.

The "Serializing source map" benchmark time was cut in half. About half of those gains are from reducing the calls to util.toSetString in ArraySet, the other half is from removing the duplicate calls to indexOf.
@fitzgen fitzgen merged commit cdf720d into mozilla:master Aug 25, 2015
@zertosh
Copy link
Contributor Author

zertosh commented Aug 26, 2015

np @fitzgen! I just rebased #202, any thoughts on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants