Prime the decoder buf for modest perf improvement on small messages.

pull/13171/head
Joshua Haberman 13 years ago
parent d5324d1d5c
commit 8bdc6d233e
  1. 2
      upb/pb/decoder.c

@ -369,6 +369,8 @@ void upb_decoder_decode(upb_decoder *d, upb_status *status) {
}
d->status = status;
upb_dispatch_startmsg(&d->dispatcher);
// Prime the buf so we can hit the JIT immediately.
upb_trypullbuf(d);
while(1) { // Main loop: executed once per tag/field pair.
upb_decoder_checkdelim(d);
upb_decoder_enterjit(d);

Loading…
Cancel
Save