diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-08-20 18:43:11 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-08-20 18:43:11 -0700 |
commit | adb6580d9728c3533faf779812bd7f4c9b27170d (patch) | |
tree | 2aa721539ed7f067e26c2d6b16c657307700150b /upb/handlers.c | |
parent | a5e6a7b029850f77059800d6611f406b91f87dfe (diff) |
Let the JIT emit hasbit-setting code in addition to calling a callback.
This leads to a major (20-40%) improvement in the parsetoproto2
benchmark with small messages. We now are faster than proto2 in all
apples-to-apples comparisons, at least given the (admittedly
limited) set of benchmarks in this source tree.
Diffstat (limited to 'upb/handlers.c')
-rw-r--r-- | upb/handlers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/handlers.c b/upb/handlers.c index d02a32a..b6d0244 100644 --- a/upb/handlers.c +++ b/upb/handlers.c @@ -31,7 +31,7 @@ static upb_fhandlers *_upb_mhandlers_newfhandlers(upb_mhandlers *m, uint32_t n, if (f) abort(); upb_fhandlers new_f = {false, type, repeated, repeated && upb_isprimitivetype(type), UPB_ATOMIC_INIT(0), - n, m, NULL, UPB_NO_VALUE, NULL, NULL, NULL, NULL, NULL, + n, -1, m, NULL, UPB_NO_VALUE, NULL, NULL, NULL, NULL, NULL, #ifdef UPB_USE_JIT_X64 0, 0, 0, #endif @@ -156,7 +156,7 @@ upb_mhandlers *upb_handlers_regmsgdef(upb_handlers *h, upb_msgdef *m, static upb_fhandlers toplevel_f = { false, UPB_TYPE(GROUP), false, false, UPB_ATOMIC_INIT(0), 0, - NULL, NULL, // submsg + -1, NULL, NULL, // submsg #ifdef NDEBUG {{0}}, #else |