diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-08-20 17:49:14 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-08-20 17:49:14 -0700 |
commit | 8bdc6d233e54b93d19a98b85b2c173c08c13f04a (patch) | |
tree | 7102f634da072b01c1cc2b10b03e634555b02d82 /upb | |
parent | d5324d1d5c177287364bac51a9fc82717829d42f (diff) |
Prime the decoder buf for modest perf improvement on small messages.
Diffstat (limited to 'upb')
-rw-r--r-- | upb/pb/decoder.c | 2 |
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); |