Software Engineering discussion
Beautiful Code
>
On-the-Fly Code Generation for Image Processing
date
newest »


Security concerns is a good point.
Compilers are almost always better optimizers too. About 10 years ago, I converted a FFT written in C to assembly for a "bad compiler". My assmebly FFT was only a small amount better than the optimized compiler's code. This chapter reminded me of doing that in many ways. The assmebly instructions were flowing back in to my head.
I've written some really bad animation software just because I wanted to learn sprites and direct X, and I've used the BitBlt functions in windows. When I started to animate sprites, there were several poor changes that I made that crawled the application to a halt due to the high number of calculations. Before experimenting with this myself, I would have had a hard time believing graphics were so intensive.
I had not seen C# used to generate VM instructions before, and I wonder if the same could be done with Java. I am somewhat, but not totally, convinced that all this work is worth a 4x speedup. It seems to me that the real question is why the compiler isn't smart enough to optimize this code to this degree in the first place. Also, I would have liked to see how long a dedicated GPU would take for this same graphics task.