Earlier quoted context omitted.
LLVM? I don't have much experience with runtime code generation but you might find it useful.
LLVM would seem to (maybe? possibly!?) be a good solution, but I was never able to convincingly determine if it was likely to solve my problems, and the documentation seemed to be quite sparse for doing what I wanted to do. (This was a couple years ago, however, and I've love to be proven wrong.)
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.