Home GnuPG
Diffusion GnuPG d3a98ff5bc97

gpgscm: Reduce opcode dispatch overhead.
d3a98ff5bc97Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpgscm: Reduce opcode dispatch overhead.

* tests/gpgscm/scheme.c (s_thread_to): New macro.
(CASE): Likewise.
(opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace
's_goto' with 's_thread_to' where applicable.

This is a straight-forward optimization that replaces 's_goto' in
certain cases. Instead of returning to the calling function, and
dispatching the next opcode, we can jump to the opcode handler.

  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Nov 10 2016, 11:47 AM
Parents
rG568cfcde45a0: gpgscm: Make the compile-hook configurable.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rGd3a98ff5bc97: gpgscm: Reduce opcode dispatch overhead. (authored by Justus Winter <justus@g10code.com>).Nov 10 2016, 2:57 PM