Speed up your Civ V games with LUAJIT dll

bc1

Joined
Jan 12, 2004
Messages
1,281
There is now a Just-in-time (JIT) compiler for Lua which seems compatible with Civ V (used for some time on a fairly high end Win 7 x64 machine), which seems to speed up the game (noticeably when running lua intensive mods or map scripts or very large maps)

At your own risk:

1/ download the following file from its open source repository:
https://github.com/malkia/ufo/blob/master/bin/Windows/x86/luajit.dll?raw=true

2/ in the Civ V application folder, rename existing lua51_Win32.dll to something else (or move it somewhere else), and replace with the downloaded file (which needs to be renamed to lua51_Win32.dll)

3/ :goodjob: run the game as usual...

Does this also work for you ?
 
No, there is no difference. Tried quick save from Large earth map

Without your file first turn = 18 - 18,5 sec

With your file the same first turn from the same quick save - 18 - 18,9 sec

So no really difference.
 
I didn't notice any improvement on my huge continents map. It was a game on epic speed, somewhere around turn 1100, and the turn times were more than one minute with both DLLs.
 
I'm on XP, and by turning off some graphics, then use quick movement and quick combat, I still hold on, on a huge map.

36 cities, and I decided to use "let the workers go rampant"!

It saves a lot of managing, and the workers do their job pretty well so far. :)
 
I play exclusively in strategic view, I can't stand the game load times and I've gotten so used to strategic view now that the normal view just seems cluttered and difficult to see what's going on.
 
I play exclusively in strategic view, I can't stand the game load times and I've gotten so used to strategic view now that the normal view just seems cluttered and difficult to see what's going on.

Same here! The only problem I found is that with Gods and Kings, I cannot see the religious details of cities in strategic view. Have you found any workaround?
 
:eek: over one minute ? :hmm: did you turn animations off ? :run: that's the first thing to do if you want to speed up your game...

I turned combat animations off, but I enjoy the movement animations. I've read that turning them off can improve performance. I did try that, but 1) it didn't improve performance by much, and 2) I hated seeing my units teleport around. So ugly!

Anyway, I was just posting my results. I couldn't get exact times because I kept getting interrupted by AI nonsense, but I played about 8 turns with each DLL and the overall time was about the same.
 
Thanks for the feedback :) But please also note the dll only affects the speed of pure lua scripting activity, and has no effect on speed of other activities such as graphics, native C code, and even C funtions called by lua... Also since lua is used a lot by the UI, it should also feel a bit more responsive.
 
Errr... I've scanned this and I can't get anything to flag it, but I'm pretty sure downloading this is a security risk.

I guess I'll look and feel pretty stupid if this is some kind of malware.

Then again, it's not the first EXE/DLL I've downloaded off here :crazyeye:

EDIT: Interesting. When running UP(G&K) and Infoaddict it does seem to speed it up.
 
GitHub is a totally legit coding platform, well known under programmers.
You can even download the source code to check if there's malicious code in it (theoretically). The user, who developed this .dll, has been active on GitHub since 2010, and I think this lowers the chance that he might be a malware author.

Additionally we've uploaded the .dll to virustotal.com, and no malware scanner detects it as malicious.

-> I guess it's safe :D.
 
I play exclusively in strategic view, I can't stand the game load times and I've gotten so used to strategic view now that the normal view just seems cluttered and difficult to see what's going on.

Seconded. I only go into normal view for screenshots these days.

Same here! The only problem I found is that with Gods and Kings, I cannot see the religious details of cities in strategic view. Have you found any workaround?

If you zoom in close to the cities, you can hover over them and it tells you the number of followers present in each city.
 
It works great on my PC..... turns reduced from 2 minutes to 20 seconds.... using some mods, which are intensive on Lua, so it is working it's magic....
Also, CPU use went from 35% to 59%, avg, so guess the JIT compiler is doing it's magic....
 
Oh? If this works civ V might actually be playable. I'll give it a test when I have time. I'm sick of giving orders and then waiting a few seconds before the game lets me give another one or end turn, while playing in strategic view without animations.
 
I play exclusively in strategic view, I can't stand the game load times and I've gotten so used to strategic view now that the normal view just seems cluttered and difficult to see what's going on.
Same here, I play only on Strategic View. Quite faster, and I actually prefer this view mode.
 
I found that this is braking some mods, like Ingame Editor and Cultural Expansion.... might be one of the reasons it is speeding up....
 
I'm on XP, and by turning off some graphics, then use quick movement and quick combat, I still hold on, on a huge map.

36 cities, and I decided to use "let the workers go rampant"!

It saves a lot of managing, and the workers do their job pretty well so far. :)

I've found that you really only need to micro manage at the very beginning and at strategic points at certain points of the game. Otherwise letting them run rampant works fine.
Only change I would like to see is the removal of marshes from the "don't clear forest marshes" options. Marshes are just useless and its annoying being allowing to build crap over them. They don't provide something of equal or greater value like forests do compared to when they are cleared.
 
I've found that you really only need to micro manage at the very beginning and at strategic points at certain points of the game. Otherwise letting them run rampant works fine.
Only change I would like to see is the removal of marshes from the "don't clear forest marshes" options. Marshes are just useless and its annoying being allowing to build crap over them. They don't provide something of equal or greater value like forests do compared to when they are cleared.

The Dutch disagree!
 
Top Bottom