Conversation
timostamm
commented
May 10, 2024
| "generate:js": "protoc --es_out=src/gen/js --es_opt=ts_nocheck=false,target=js+dts,import_extension=.js --proto_path=. $(buf ls-files extra) --proto_path=$(upstream-include test) $(upstream-files test) google/protobuf/type.proto", | ||
| "postgenerate": "license-header src/gen", | ||
| "perf": "tsx src/perf.ts benchmark '.*'", | ||
| "profile": "dexnode dist/esm/perf.js run 'fromBinary perf-payload.bin' 10000", |
Member
Author
There was a problem hiding this comment.
The resulting logs can be inspected with the deopt explorer. Seems worth keeping this script and dep.
| // eslint-disable-next-line no-case-declarations | ||
| const [key, val] = readMapEntry(field, reader, options); | ||
| message.setMapEntry(field, key, val); | ||
| readMapEntry(message, field, reader, options); |
Member
Author
There was a problem hiding this comment.
Avoiding an eager bailout here.
Comment on lines
+796
to
+799
| listKind: undefined, | ||
| mapKind: undefined, | ||
| mapKey: undefined, | ||
| delimitedEncoding: undefined, |
Member
Author
There was a problem hiding this comment.
Adding these properties means that the JIT can use the same map. It adds some bytes to the bundle size, but that's always the trade-off. I think it's worth it here for the >10% gain.
srikrsna
approved these changes
May 10, 2024
srikrsna-buf
approved these changes
May 10, 2024
This was referenced May 10, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following #834, we can make another - but smaller - performance improvement by avoiding a couple of deopts in v8: