[TCLCORE] Implemented TIP 348 : ::tcl::errorStack
by Alexandre Ferrieux other posts by this author
Oct 5 2009 1:50AM messages near this date
[TCLCORE] changes for 8.5.8 releases
|
[TCLCORE] Slowness is passing data into slave interpreters
Hi,
I'm pleased to announce the completion of the reference implementation
of TIP 348, bringing substituted tracebacks ala Python/gdb. Please
review.
One nice thing is the very small overhead:
- zero (one boolean test in Tcl_LogCommandInfo) when not enabled
- very little when enabled:
for {set i 1} {$i<10} {incr i} {
proc f$i x "f[expr {$i+1}] \$x"
}
proc f10 x {error F10:$x}
time {catch {f1 12}} 10000
-> 75.4951 microseconds per iteration
set ::tcl::useErrorStack 1
time {catch {f1 12}} 10000
-> 79.7074 microseconds per iteration
puts $::tcl::errorStack
{f10 12} {f9 12} {f8 12} {f7 12} {f6 12} {f5 12} {f4 12} {f3 12}
{f2 12} {f1 12}
This is a 6% overhead in a 10-level catch with empty hulls as procs.
Should be vanishingly small if we add any real meat.
-Alex
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
|