Merge pull request #309 from haberman/decoder-forceinline

Add UPB_FORCEINLINE for varint32 decoding.
pull/13171/head
Joshua Haberman 4 years ago committed by GitHub
commit 02ff6fb996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      benchmark.py
  2. 1
      upb/decode.c

@ -15,7 +15,7 @@ import tempfile
@contextlib.contextmanager
def GitWorktree(commit):
tmpdir = tempfile.mkdtemp()
subprocess.run(['git', 'worktree', 'add', '-q', tmpdir, commit], check=True)
subprocess.run(['git', 'worktree', 'add', '-q', '-d', tmpdir, commit], check=True)
cwd = os.getcwd()
os.chdir(tmpdir)
try:

@ -227,6 +227,7 @@ static const char *decode_varint64(upb_decstate *d, const char *ptr,
}
}
UPB_FORCEINLINE
static const char *decode_varint32(upb_decstate *d, const char *ptr,
const char *limit, uint32_t *val) {
uint64_t u64;

Loading…
Cancel
Save