In SX Microcontrollers, SX/B Compiler and SX-Key Tool, dabayliss wrote: Zoot - as I said in my first post - I don't know if optimization is the goal. Obviously if it isn't then so be it. I am not trying to be mean or rude. However as as someone with experience in the field I figured I would offer some ideas ... With regard to your point about the step bounds and method; provided the variable is not being used they are irrelevant - you can pre-compute the number of iterations that will occur and set your outer variable accordingly. In fact the savings in the case you mention are even higher as a -3 is much more expensive than an INC. I don't think top-down (recursive decent) or bottom up (lalr et al) is really the issue. It comes down to whether they compile into some kind of intermediate representation and then generate code or whether they generate the code 'line-by-line'. If the latter then this form of 'global' optimisation is almost impossible - if the former then it is relatively easy. David ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=323767#m324119 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)