diff options
author | Josh Haberman <jhaberman@gmail.com> | 2011-08-19 19:20:42 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2011-08-19 19:20:42 -0700 |
commit | 3387ccaffde71adaf81f481d5a686ae03e001a54 (patch) | |
tree | 958f58c0c273dc4083efbb16e3a9bf28f558d81e /upb | |
parent | a090a7abf62392a094a99c3fcc1d0cd35b4f4672 (diff) |
Avoid longjmp() in successful case.
Speeds up short messages by 15-25%.
Diffstat (limited to 'upb')
-rw-r--r-- | upb/pb/decoder.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index 218c780..df74b48 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -374,7 +374,10 @@ void upb_decoder_decode(upb_decoder *d, upb_status *status) { upb_decoder_enterjit(d); // if (!d->dispatcher.top->is_packed) upb_fhandlers *f = upb_decode_tag(d); - if (!f) upb_decoder_exit2(d); + if (!f) { + upb_decoder_onexit(d); + return; + } f->decode(d, f); upb_decoder_commit(d); } |