However, this optimization is only done when there is no default passed to in-module, because using with-handler around %%in-scheme resulted in a huge slowdown.
If there is a way to call %%in-scheme and trap its result without using with-handler, maybe it could be added later.
(in-module mod symb . default)
will now use%%in-scheme
whenmod
isSCHEME
.The new code:
Following is an illustration of the speedup.
Old code: around 1200 ms New code: around 300 ms
However, this optimization is only done when there is no default passed to
in-module
, because usingwith-handler
around%%in-scheme
resulted in a huge slowdown.If there is a way to call %%in-scheme and trap its result without using
with-handler
, maybe it could be added later.