Optimizations for embedded systems

Hi,

I'm reading a research paper that describes a loop optimization technique that removes nested conditional blocks. The authors claim that their transformation yields a speed-up of 30% on average applied to some embedded systems software (referring just to the code segments containing the nested loops). Since their approach duplicates the loop iteration space, they also provide the resulting code increase that is almost 80% on average.

What do you think, is this approach promising? I mean an execution speed-up of 30% for the nested loops is a great improvement, but on the other hand you almost double the loop code size. So, in my opinion, such a large code size increase for embedded systems with limited memory is very crucial and I wonder if embedded systems vendors would accept it or would rather completely forgo this optimization.

Thank you for your opinion.

Best regards, Christian

Reply to
Christian Christmann
Loading thread data ...

There is almost always a tradeoff between code size and speed. Every application is different so there is no 'right' answer, only ' most appropriate for this particular instance'. For the same reason, the figures above are also of course meaningless as every application will be different - in each case the optimum tradeoff needs to be considered. As code space is generally more important, the default behavour should be 'only unroll loops when and where is absolutely necessary'.

Reply to
Mike Harrison

In article , Christian Christmann writes

As far as I know most embedded compilers already incorporate loop optimisation for speed or size. I don't think there is anything new here.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris Hills

Write for clarity, then profile the result. Do it under various optimization flags. Then apply that thing held up by your neck.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.