mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
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>
This commit is contained in:
parent
568cfcde45
commit
d3a98ff5bc
File diff suppressed because it is too large
Load Diff
@ -90,6 +90,11 @@ extern "C" {
|
|||||||
# define USE_COMPILE_HOOK 1
|
# define USE_COMPILE_HOOK 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Enable faster opcode dispatch. */
|
||||||
|
#ifndef USE_THREADED_CODE
|
||||||
|
# define USE_THREADED_CODE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef USE_STRCASECMP /* stricmp for Unix */
|
#ifndef USE_STRCASECMP /* stricmp for Unix */
|
||||||
# define USE_STRCASECMP 0
|
# define USE_STRCASECMP 0
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user