-
March 27th, 2021, 19:11 #1
- Join Date
- Jun 2018
- Location
- Richardson, TX
- Posts
- 71
Will FGU ever be updated to use Lua 5.4?
Will FGU ever be updated to use Lua 5.4? Lua 5.1 was last updated in 2012.
-
March 28th, 2021, 01:37 #2
- Join Date
- Apr 2020
- Posts
- 93
My suspicion would be probably not, or at least not any time soon.
Every game system, extension, module, and everything else that has lua scripts in it would probably need to be completely rewritten for 5.4. That is a lot of work.
-
March 28th, 2021, 04:23 #3
Moon Wizard did a small test to see the impact and it was considerable.
At this time there are many items that provide more value on their to do list.
So... maybe... but dont hold your breath.
-
March 30th, 2021, 04:41 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,426
There was a huge change between Lua 5.1 and 5.2 that breaks the entire way that function environments are defined in Lua. A couple years ago, I tried migrating the engine to Lua 5.3, but the function environment changes blocked that move. Because each object and script is expected to have its own environment in FG (as well as handler registrations), the function environments are required for the FG API to work. Changing that assumption breaks every ruleset and extension ever written. I tried the suggested workarounds I found in various forums and coding sites, but none of them were able to replicate that behavior.
I may re-assess at some point; but there are not really any pressing must-have enhancements I have seen in the Lua 5.2/5.3/5.4 change notes.
Regards,
JPG
-
March 30th, 2021, 09:40 #5
- Join Date
- Aug 2019
- Posts
- 2,025
I would mainly wonder about performance improvements?
From https://lwn.net/Articles/826134/:
Version 5.4 also brings a new generational garbage collection (GC) mode, which performs better for certain kinds of programs where objects usually have a short lifetime.One of the unsung features in 5.4, is a significantly faster interpreter, though the release notes have overlooked it. In a test I did on my 64-bit macOS machine using Gabriel de Quadros Ligneul's Lua Benchmarks suite, I found that version 5.4 was an average of 40% faster than version 5.3 across 11 benchmarks included in the suite:
From https://eklausmeier.wordpress.com/20...-5-3-5-4-vs-c/
Code:C (no optimization flags): 0.53s C: 0.2s Lua 5.1: 6.15s Lua 5.2: 7.2s Lua 5.3: 5.83s Lua 5.4: 3.92s LuaJIT: 0.58s Pallene: 0.32s Pallene with compiler optimization flags: 0.31s
Those who need much higher performance can use Mike Pall's LuaJIT, a just-in-time compiler for Lua 5.1 that is significantly faster than the stock Lua interpreter. However, LuaJIT hasn't added any of Lua's new features since version 5.1 (which was released in 2006).Last edited by Weissrolf; March 30th, 2021 at 09:44.
-
March 30th, 2021, 09:47 #6
- Join Date
- Aug 2019
- Posts
- 2,025
LuaJIT also claims to speed up the interpreted parts:
For LuaJIT 2.0, the whole VM has been rewritten from the ground up and relentlessly optimized for performance. It combines a high-speed interpreter, written in assembler, with a state-of-the-art JIT compiler.
https://luajit.org/performance_x86.html
For example: MD5 of LuaJIT compiler is 112 (!) times faster than Lua 5.1.5 and LuaJIT interpreter's MD5 is still 5 (!) times faster than Lua 5.1.5Last edited by Weissrolf; March 30th, 2021 at 09:56.
-
March 30th, 2021, 09:57 #7
- Join Date
- Aug 2019
- Posts
- 2,025
Last, but not least, LuaJIT uses a MIT license, which seems very permissive on a quick glance.
-
April 7th, 2021, 22:31 #8Got a Bug - Click & FOLLOW the procedure here, it will save time
Ultimate Edition Fantasy Grounds - ONLY ON Linux
Twitch Channel
-
April 7th, 2021, 22:57 #9
- Join Date
- Jan 2009
- Location
- England
- Posts
- 190
I think Weissrolf's concern (and mine too tbh) is the missing out of the potential performance gains that an update would benefit from. As it currently stands, FGU's biggest weakness is its poor performance, even before comparing to other VTTs. When you do start comparing it - especially to the newer ones using the newer technologies - FGU is going to end up in a worse and worse place.
Edit: and my comments on poor performance is regarding the state of things before all of the lighting updates.
Edit2: One more thing I would like to highlight - I can't see myself ever changing VTT. I love FG, warts and all!Last edited by Surge; April 7th, 2021 at 23:05.
-
April 8th, 2021, 01:30 #10
- Join Date
- Aug 2019
- Posts
- 2,025
LuaJIT seems to be Lua version 5.1 on steroids. If that's not worthwhile to look at then nothing ever will.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks