Software Engineering discussion

7 views
Beautiful Code > On-the-Fly Code Generation for Image Processing

Comments Showing 1-2 of 2 (2 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (new)

I enjoy seeing multiple ways to solve the same simple problem. I, however, would have liked to see more detail on the Windows stack compilation solution. In particular, I would like to know if this approach would run today, given that executing data as code is a no-no for security reasons.

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.


message 2: by Erik (new)

Erik | 165 comments I liked this chapter, because it showed something I didn't know C# could do. Although, I'm not sure I'll ever write anything that uses these features.

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.


back to top