jcb / iteris.com (MetalOne) writes:

> I have been writing some image processing algorithms that run on incoming
> video.  At 30fps, there is only 33ms to do all processing.
> The following Ruby code is typical of the kind of loops being run.
> A lookup table is created that maps video input into the desired output.
> The image is then iterated over applying the loopup table to each element.
> 
> The following script takes 1.6 secs to execute on my PIII 866Mhz.
> The equivalent C++ code takes 8 ms to execute.
> A factor of 200 difference.

Find out the difference and write it in C, preferably using
Ruby::Inline for your convenience. This is the 10/90 rules again: 10%
of the code is executed 90% of the time. Find that 10% and optimise
away.

YS.