Tk Library Source Code

View Ticket
Login
Ticket UUID: 526404
Title: new [catch] benchmark: complex bodies
Type: Patch Version: None
Submitter: msofer Created on: 2002-03-06 14:37:32
Subsystem: tclbench Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-03-27 03:21:14
Resolution: Accepted Closed By: msofer
    Closed on: 2002-03-26 20:21:14
Description:
On finding an error, [catch] scans all exceptionRanges
of the bytecode. I am planning to patch
GetExceptRangeForPc (in generic/tclExecute.c) with a
faster algorithm (see Tcl-patch  #453709).

I enclose here a patch which is necessary to illustrate
the improvement, as it is only important when [catch]
is part of a complex proc body, with many ranges and
many nesting levels.

Any comments before I commit?
User Comments: msofer added on 2002-03-27 03:21:14:
Logged In: YES 
user_id=148712

Oops ... forgot to close this: new test was committed on
15-03-2002

hobbs added on 2002-03-08 03:05:23:
Logged In: YES 
user_id=72656

fine by me.

msofer added on 2002-03-07 23:41:03:
Logged In: YES 
user_id=148712

To illustrate the effect *only* on catch, it may be better
to avoid measuring the time spent in the funny loops; after
building them, do just

set body "
    catch {set b}
    return  
    $nestedRanges
"

msofer added on 2002-03-06 21:37:32:

File Added - 18889: CATCH.patch

Attachments: