Skip to content
Tcl Source Code Artifact [0b32bbd550]
Login

Artifact [0b32bbd550]

Artifact 0b32bbd550e4e859b7c867a1e31d2e6bd517e88a:

Ticket change [0b32bbd550] - New ticket [465811ffffffffff|465811ffff] <i>Optimize if/while/... during compilation</i>. by andreas_kupries on 2001-09-27 20:50:54.
D 2001-09-27T20:50:54
J assignee msofer
J cmimetype text/plain
J comment This\sis\spossibly\snot\sa\sfeature\srequest\sbut\sa\s\nperformance\sbug\s/\nenhancement.\n\nThe\scontrol\scommands\s[if],\s[while]\sand\s[for]\scurrently\s\ndo\snot\scheck\ntheir\sexpression\sarguments\sfor\sstatic\sstrings\sand\s\nconstant\nexpressions.\sThis\smeans\sthat\sfor\sexample\n\nif\s{0}\s{\nbla\n}\n\nis\scompiled\sinto\sbytecode\sdespite\sthe\sfact\sthat\sthe\s\ncode\swill\snot\sbe\nexecuted,\sever.\n\nI\spropose\sthat\sthe\scompile\sprocedures\sfor\sthe\s\naformentioned\scommands\nare\sextended\sto\sdetect\ssimple\sconstant\sexpressions\sand\s\nto\sreact\naccordingly.\sI.e.\snot\sto\scompile\sthe\sif/while/for\s\nstatement\sat\sall\sor\nonly\spartially\sand\sto\scompile\sonly\sthe\ssub-scripts\s\nwhich\sare\sreachable\nfor\sthe\sconstant\sexpression.\n\nThis\senhancement\sis\salong\sthe\slines\sof\sthe\s\noptimization\sfor\s[proc\n{args}\s{}],\sbut\sshould\spresent\sless\sproblems\swith\s\nrecompilation\sas\sno\ncommands\sare\simplicitly\sadded\sor\sremoved\sfrom\sthe\s\ninterp.\sIt\sdoes\npresent\sa\snew\sset\sof\schallenges\sif\swe\swant\sto\sgo\s\nbeyond\sthe\sdetection\nof\ssimple\sconstant\sexpressions\sto\sthe\sdetection\sof\s(0\s\n&&\s...)\setc.\n\nNote:\sThis\sis\seasier\sfor\slogical\sexpressions\sas\sthey\s\nare\sdefined\sto\nhave\sshortcircuit\sevaluation\sand\sthus\spresent\sless\s\nproblems\swith\nregard\sto\svariable\stracing.\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter andreas_kupries
J subsystem 47.\sBytecode\sCompiler
J title Optimize\sif/while/...\sduring\scompilation
J type RFE
K 465811ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z b52413788e4f8e039da54f86d2efed25