LLVM? I don't have much experience with runtime code generation but you might find it useful.
Or use it to compile your C as it is pretty quick. It's not going to speed things up by orders of magnitude but every bit helps.
A[12800]=A[0] * A[6400];
A[12801]=A[1] * A[6480];
A[12802]=A[12800] + A[12801];
A[12803]=A[2] * A[6560];
A[12804]=A[12802] + A[12803];
A[12805]=A[3] * A[6640];
Which would be very easy to deal with. The only problem is that I sometimes call out to libraries for exp, log, sin, cos, etc.py2llvm looks pretty interesting.
http://code.google.com/p/py2llvm/
http://code.google.com/p/py2llvm/source/browse/trunk/CodeGen...