Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Generate specialized mergePartial() method when optimize_for = SPEED #583

Open
jcready opened this issue Sep 14, 2023 · 0 comments

Comments

@jcready
Copy link
Contributor

jcready commented Sep 14, 2023

Currently specialized methods are generated for: create(), internalBinaryRead(), and internalBinaryWrite() when optimize_for = SPEED

// "MyMessage$Type" members for optimized binary format
if (optimizeFor === OptimizeMode.SPEED) {
classDecMembers.push(
...this.typeMethodCreate.make(source, descriptor),
...this.typeMethodInternalBinaryRead.make(source, descriptor),
...this.typeMethodInternalBinaryWrite.make(source, descriptor),
);
}

The same could be done for mergePartial() to avoid relying on runtime reflection and iteration.

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

No branches or pull requests

1 participant