thank you!
the first poster said something about optimizing the compiler. there is also a luajit 2.1 beta out, i wonder what could be done to adapt the compiler specific to civ.
i also found that:
https://forums.civfanatics.com/threads/increase-memory-on-64bit-machines.544026/
maybe it also works for civ v, if its a 32bit app. have to try it out.