ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
[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&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved