I'll be doing more in depth profiling as soon as things settle down at work. I'll also probably want to insert some specific runtime evaluations in order to maintain a trackable progression easier than rerunning profiles. Right now though, the largest bottleneck is in the setup and running of the vm. So, a couple questions come to mind in that area which I'll get to in a sec here. I can't agree with you more.
Individual optimizations are always less usefull than general algorithm based changes.
I can't seem to find any method in which the current vm is running in the SIMD like nature usually associated with a Reyes shader vm. The big reason of course is that with the SIMD system you can optimize shader execution to run uniform code only once per grid and then code that deals with variants on a per mpg basis. Of course, I could still be missing something in the vm and it is actually running SIMD'like instructions somehow that I've not figured out yet. The illumination cache seems to simply be setting up various incidence and reflection rays for each light when called. It seems that it gets called an awfull lot even when it's not used.