Nice to see that this kind of extreme noise is not normal for the SX40.
Well, I decided to eliminate any other variables that I thought might be playing a part in it (with regards to CHDK), and installed the stable release version. Previously I had been using the development trunk that I had compiled myself (to get lua native calls enabled). Anyway, here are the results of the first experiment repeated:
Couldn't be bothered annotating/resizing it this time. It is 3200ISO, 2.7f, and 256seconds with dark-frame subtraction enabled. RAW image looks somewhat worse (but much better than the previous result), I assume this is because it does not have dark-frame subtraction enabled though.
BTW those yellow bright spots are from light getting past the lens cover (it was pointed at a ceiling light). I assume that the purple fringe on the right is that amp glow that this thread was started for. I can live with it though.
So now all I have to do is work out why it was giving out those terrible results before.
I might have to recompile CHDK with another compiler and see if its still works then. no I guess that would probably have nothing to do with it. Probably some random obscure setting I accidentally enabled when I was playing around with it.
Cheers