Skip to content

Speedup struct decoding - #119

Merged
jcrist merged 1 commit into
mainfrom
speedup-struct-decode
Jun 10, 2022
Merged

Speedup struct decoding#119
jcrist merged 1 commit into
mainfrom
speedup-struct-decode

Conversation

@jcrist

@jcrist jcrist commented Jun 10, 2022

Copy link
Copy Markdown
Member

This further optimizes the decoding of Struct types by rearranging the
field lookup loop a bit to avoid % operations. This optimization
is most effective on gcc, resulting in a 20% speedup in decode time.
Clang already did most of this optimization automatically. With this
change, on gcc bench.py decreases from ~700 us to ~550 us for json
decoding.

This further optimizes the decoding of Struct types by rearranging the
field lookup loop a bit to avoid `%` operations. This optimization
is most effective on gcc, resulting in a 20% speedup in decode time.
Clang already did most of this optimization automatically. With this
change, on gcc `bench.py` decreases from ~700 us to ~550 us for json
decoding.
@jcrist
jcrist merged commit 6db3c53 into main Jun 10, 2022
@jcrist
jcrist deleted the speedup-struct-decode branch June 10, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant