Tcl Source Code

View Ticket
Login
Ticket UUID: 1794073
Title: [return -level 0] improve bytecode
Type: RFE Created on: 2007-09-13 18:06:58
Submitter: dgp Assigned to: dgp
Subsystem: 47. Bytecode Compiler Severity:
Priority: 5 Medium Last modified: 2007-10-19 04:16:24
Status: Closed Closed by: dgp
Resolution: Fixed Closed on: 2007-10-18 21:16:24
Version: None
Description:
kbkconcat slightly faster than subst - both significantly faster than either format or return -level 0
dgpas aliases, or directly?
kbkas aliases.
tclguyis that because return -level 0 won't be bytecoded?
tclguyand if so, can't that be easily corrected?
dgpok, I expect non-aliased [concat] to be the winner then
dgp[return -level 0] is bytecoded, but not as a special case, I think
tclguyis concat bytecoded?
tclguybecause return is just a push ...
dgpLikely that some more checking in TclCompileReturnCmd could turn it into INST_CONCAT
dgpspecial cases of return is just a push
dgpbut [return -level 0] wouldn't qualify
dgp"just a push" == INST_DONE
kbktclguy - ISTR that concat of a single arg is just a push.
dgpthe INST_CONCAT optimization sounds good though.
   * rmax cd ~
dgp"just a push" not quite accurate.
dgpthe command argument would already be pushed
dgpmore like "just convert TOS to the command result"
dgpanyhow, some good ideas here I can't immediately implement, recoding in Tracker...
User Comments:
dgp added on 2007-10-19 04:16:24:
Logged In: YES 
user_id=80530
Originator: YES


Improvement committed for 8.5b2