Reply to Sandeep,

I have been wishing for something similar though for different
reasons. Often I have code (in C++) that is executed for a large
amount of data like in stream programming and becomes a major hotspot
for the application. Think software graphics pipelines. Further, this
code has lots of branches and since its executed over many elements
they are essentially branches in inner-loops. The values over which
they branch are unknown till runtime and the number of combinations of
the values can be very very high. Here are the basic attempts to solve
that I'm aware of and the problems with each:


One option you could use under GCC would be to build all the inner control structures out of gotos and use goto variables that are set outside the loop. I'm not sure how dynamic gotos stack up with conditional jumps but you would still avoid the tests.


Sandeep



Reply via email to