Skip to content

Short-circuit empty packed fields in CodedInputStream.countPackedVarints - #29237

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_966610703
Draft

Short-circuit empty packed fields in CodedInputStream.countPackedVarints#29237
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_966610703

Conversation

@copybara-service

Copy link
Copy Markdown

Short-circuit empty packed fields in CodedInputStream.countPackedVarints

0-length packed fields occur but are fairly rare since our serializers will emit nothing instead of emitting a 0-length packed field. But, there's little reason to leave inequality case behind since we're checking against <=0 anyway.

0-length packed fields occur but are fairly rare since our serializers will emit nothing instead of emitting a 0-length packed field. But, there's little reason to leave inequality case behind since we're checking against <=0 anyway.

PiperOrigin-RevId: 966610703
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.

1 participant