summaryrefslogtreecommitdiff
path: root/upb/pb
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2011-08-19 19:20:42 -0700
committerJosh Haberman <jhaberman@gmail.com>2011-08-19 19:20:42 -0700
commit3387ccaffde71adaf81f481d5a686ae03e001a54 (patch)
tree958f58c0c273dc4083efbb16e3a9bf28f558d81e /upb/pb
parenta090a7abf62392a094a99c3fcc1d0cd35b4f4672 (diff)
Avoid longjmp() in successful case.
Speeds up short messages by 15-25%.
Diffstat (limited to 'upb/pb')
-rw-r--r--upb/pb/decoder.c5
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);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback