protobuf-ts
protobuf-ts copied to clipboard
Enhancement: Generate specialized `mergePartial()` method when `optimize_for = SPEED`
Currently specialized methods are generated for: create()
, internalBinaryRead()
, and internalBinaryWrite()
when optimize_for = SPEED
https://github.com/timostamm/protobuf-ts/blob/3a7ce47d43113d1a80cacd0ae70630b3727eda3e/packages/plugin/src/code-gen/message-type-generator.ts#L116-L123
The same could be done for mergePartial()
to avoid relying on runtime reflection and iteration.