??? 07/06/05 17:46 Read: times |
#96710 - manual optimization Responding to: ???'s previous message |
"Micro optimisation?" maybe - but repeated so often to cause a macroscopic benefit!
It is ludicrous to expect anyone, that consider him/herslef a real programmer, to familiarize him/herself with something as uninteresting as hardware. That would remove the idea of abstraction and thinking in real terms has absolutely nothing to do with programming. To have to think about what should be where in memory is an abnomiable requirement, such mundane considerations have nothing to do with real programming, why can the compiler not shuffle stuff to DATA/IDATA/XDATA in an efficient manner by itself. Of course, the fact that the programmer must concern him/herself with access to peripherals must be due to total incompetence of the people programming the compiler. To make everyone happy, and make "heroic" efforts like the one Andy did obsolete, so we can finally get around to "real C" I suggest the following Mr Keil: make an optimizer that analyzes every path the program can take, optimize based on which inputs get activated how often, automatically replaces malloc() calls with optimized arrays, loves and expediently handle function pointers, shuffles variables about between XDATA, IDATA and DATA while knowing which XDATA is MMIO, changes slow loop calls to interrupt driven, reverses loops where possible and compress the code to the absolute minimum while, at the same time, get processing speed to maximum. Have it ready in a week and make it open source and free. Do not get lost in the false assumption that because we complain about the price we do not want absolute perfection. Erik |