Skip to content

Commit

Permalink
add an inline hint where i expect inlining
Browse files Browse the repository at this point in the history
i expected that modern compilers simply ignore inline specifiers
as compilers tend to be smarter than average programmers like me
these days. but it seems at least llvm still honors it. and at least
for this instance, adding the specifier produces considerably
faster code for my environment.
  • Loading branch information
yamt committed Jul 4, 2023
1 parent 05a4cfd commit 1430df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/leb128.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ read_u8(const uint8_t **pp, const uint8_t *ep, uint8_t *resultp)
return 0;
}

static int
static inline int
read_leb(const uint8_t **pp, const uint8_t *ep, unsigned int bits,
bool is_signed, uint64_t *resultp)
{
Expand Down

0 comments on commit 1430df7

Please sign in to comment.