Overview
| Artifact ID: | ffa8f2882d5b2a1ab0e0a80859bf9bd474986a20 |
|---|---|
| Ticket: | 1017884fffffffffffffffffffffffffffffffff
make 'level' arg to uplevel/upvar mandatory |
| User & Date: | dvrsn on 2004-08-27 20:58:44 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
uplevel always converts its first argument into a string in order to check if it is the optional ?level? argument. If the optional argument is not present, the first argument is converted anyway, which can take significant time and loses the benefit of direct list evaluation. set l [list] for {set c 0} {$c < 10000} {incr c} { lappend l 12345 } proc t1 {l} { set cmd [list llength $l] uplevel $cmd } proc t2 {l} { set cmd [list llength $l] uplevel 1 $cmd } puts [time {t1 $l} 100] puts [time {t2 $l} 100] - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dvrsn"
- subsystem changed to: "22. [proc] and [uplevel]"
- title changed to: "uplevel can shimmer to string unnecessarily"
- type changed to: "RFE"