To code or to blog: that has been the question. Apparently coding has been winning big time. I'm just about to put the wraps on our new MPEG encoder for Mac OS X (Carbon - for those who care). All in all I rewrote about thirty routines with Altivec SIMD code. The speedup has been worthwhile. The MPEG-2 encoder went from about 30:1 to 6:1 and the MPEG-1 encoder is now running at about 2:1. This on a lowly 400Mhz G4 laptop. I can't wait to hear how the product performs on a modern G4 screamer.
And, along the way, I dived into optimizations for our scalar (ie. standard G3 and PowerPC) version and made some big gains there as well. The scalar MPEG-1 version turns in a very respectable 4:1 for MPEG-1 encoding - almost a fourfold improvement in speed over the last version. These gains were made primarily by re-writing all the code in inner loops to remove 99% of conditional branches, using cache hint instructions, and unrolling and inlining many critical functions. And, of course, the biggest gains were from algorithmic improvements.
In any event, although I am getting much more familiar with Altivec coding, I am still looking toward making a new kind of coding tool for SIMD code. Using the C-extensions is counter-intuitive AND takes way too long (from a coding perspective).