Hi, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:
> See attached patch. This still has rough edges. For some reason, I > don't catch the memoization of display to #<proc: display>. Overall, as Kevin suggested, I'd be more in favor of using the existing trap mechanism (possibly extending it if it doesn't provide enough information to trap handlers). However, as you already said, the trap mechanism is damn slow. I guess it is mostly slow because the evaluator is slow, but the trap mechanism itself may be optimizable, too. If you look at `ENTER_APPLY' around line 3025, it makes at least two function calls: `scm_make_debugobj ()' and `scm_call_3 ()'. The former is a one-line function and should really be inlined. The latter introduces unnecessary overhead since it ends up calling `SCM_APPLY ()' which in turns necessarily jumps to the `scm_tcs_closures' case since trap handlers are always closures. Thus, at the very least, `scm_call_3 ()' should be replaced by `SCM_APPLY ()'. These small optimizations would certainly be worthwhile, although perhaps not sufficient. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel