Why Doesn't Minetest Use Luajit?

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Why Doesn't Minetest Use Luajit?

by TheReaperKing » Mon Jan 18, 2016 05:37

I'm not much of a coder but I have heard a lot of people singing the praises of Luajit over Lua. I saw that sfan's builds use Luajit as well. I am interested to know why default minetest doesn't use Luajit and what the advantages and disadvantages are. I'm personally not saying one is better than the other, I am simply asking to learn more about both. Thanks and take care!
-Mike
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: Why Doesn't Minetest Use Luajit?

by everamzah » Mon Jan 18, 2016 10:58

I think the default is to use luajit. I have both installed on my system, and when I compile minetest it picks luajit.
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

Re: Why Doesn't Minetest Use Luajit?

by jp » Mon Jan 18, 2016 11:19

TheReaperKing wrote:what the advantages and disadvantages are.

It compiles the Lua code on the fly and make it ~5x faster compared to plain Lua, getting close to C++ in execution overall.

The downside is a poor memory management. LuaJIT winces when it deals with greedy mods consuming >2 GB RAM.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Why Doesn't Minetest Use Luajit?

by rubenwardy » Mon Jan 18, 2016 11:43

Minetest does use luajit if your build has it enabled.

You only really see an advantage of luajit if you're running a server or lua intensive mods. It causes problems sometimes, AFAIK, which is why it isn't in the official build.
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: Why Doesn't Minetest Use Luajit?

by TheReaperKing » Mon Jan 18, 2016 23:30

Super insightful, thank you! I am hosting a server at a school for my kiddos so I think it will be worth testing luajit vs lua. I could simply just run sfan's one day with all the mods and regular minetest with all the mods another day. I'm very interested in the idea of compiling luajit with the educational version I'm working on so thanks for the info that it is that easy to add it as selecting it during compile. Take care and I hope you all have an awesome day!
-Mike
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Why Doesn't Minetest Use Luajit?

by twoelk » Tue Jan 19, 2016 12:49

Lua "not enough memory" error #2988
This discussion might give more insight
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: Why Doesn't Minetest Use Luajit?

by TheReaperKing » Wed Jan 20, 2016 04:03

I learned so much from that twoelk, thank you so much for the link!
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

est31
Member
 
Posts: 172
Joined: Mon Dec 29, 2014 01:49

Re: Why Doesn't Minetest Use Luajit?

by est31 » Sat Jan 23, 2016 21:50

LuaJIT and Lua both have bad memory management. The 2GB cap introduced by luajit is just so that it can stay performant, while lua itself gets slower and slower.
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: Why Doesn't Minetest Use Luajit?

by DI3HARD139 » Sun Jan 31, 2016 08:30

I wish there was a build that uses the standard lua. Needing a client that can handle high lua memory usage.
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 59 guests

cron