mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
Microoptimizations to hook dispatch
* libguile/vm.c (vm_dispatch_hook): Add a check that we're in the debug engine and the trace level is positive. Allows us to do cheaper checks for when to dispatch hooks. (scm_call_n): Just check if trace level is nonzero. * libguile/vm-engine.c (RUN_HOOK): Likewise just check if trace level is nonzero.
This commit is contained in:
parent
19cff78bb5
commit
2a8d72f7e0
2 changed files with 6 additions and 3 deletions
|
@ -112,7 +112,7 @@
|
|||
#if VM_USE_HOOKS
|
||||
#define RUN_HOOK(exp) \
|
||||
do { \
|
||||
if (SCM_UNLIKELY (VP->trace_level > 0)) \
|
||||
if (SCM_UNLIKELY (VP->trace_level)) \
|
||||
{ \
|
||||
SYNC_IP (); \
|
||||
exp; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue