Avoid longjmp() in successful case.

Speeds up short messages by 15-25%.
pull/13171/head
Josh Haberman 13 years ago
parent a090a7abf6
commit 3387ccaffd
  1. 5
      upb/pb/decoder.c

@ -374,7 +374,10 @@ void upb_decoder_decode(upb_decoder *d, upb_status *status) {
upb_decoder_enterjit(d); upb_decoder_enterjit(d);
// if (!d->dispatcher.top->is_packed) // if (!d->dispatcher.top->is_packed)
upb_fhandlers *f = upb_decode_tag(d); upb_fhandlers *f = upb_decode_tag(d);
if (!f) upb_decoder_exit2(d); if (!f) {
upb_decoder_onexit(d);
return;
}
f->decode(d, f); f->decode(d, f);
upb_decoder_commit(d); upb_decoder_commit(d);
} }

Loading…
Cancel
Save