Not an area where I have much expertise, but sounds like the original compiler was poorly done, and a lots of patches call optimizers are added. I would think a good compiler, would do a good job, based on individual lines or small groups of lines like a loop of code, and the optimizer would look at more of a macro view, to eliminate duplicate instructions, etc., say where a value is already in a register. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist