summaryrefslogtreecommitdiff
path: root/upb/pb
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2011-08-20 17:49:14 -0700
committerJoshua Haberman <joshua@reverberate.org>2011-08-20 17:49:14 -0700
commit8bdc6d233e54b93d19a98b85b2c173c08c13f04a (patch)
tree7102f634da072b01c1cc2b10b03e634555b02d82 /upb/pb
parentd5324d1d5c177287364bac51a9fc82717829d42f (diff)
Prime the decoder buf for modest perf improvement on small messages.
Diffstat (limited to 'upb/pb')
-rw-r--r--upb/pb/decoder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c
index a8ddf17..4521ce2 100644
--- a/upb/pb/decoder.c
+++ b/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);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback