MoonScript performance isuess?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Murii
Party member
Posts: 216
Joined: Fri Jul 05, 2013 9:58 am
Location: Arad, Romania
Contact:

Re: MoonScript performance isuess?

Post by Murii »

Mikaboshi wrote:
Murii wrote:
Mikaboshi wrote:No, performance won't really be an issue with MoonScript unless you force it. Read the documentation, and see what the corresponding Lua code looks like. If you use OO, it will be slower than if you don't. This is the same with Lua if you're using an OO library. If you use a ton of list/table comprehensions instead of in-place operations where possible, it will be slower. Same with Lua if you decide to make new tables instead of in-place operations. However, MoonScript is good at using best practices, like avoiding table.insert and other slow operations, so it may be faster in some situations than hand-written Lua. I'm writing my my 'engine' code in Lua and my game code in MoonScript and have no problems.

To clarify, compilation time is not related to performance. Compilation time isn't a problem with MoonScript, as in the time it takes to turn a .moon file into a .lua file. Performance is what my paragraph above is related to.
Can you explain me how to compile moon into lua?Perhaps a simple example would be fine!
Install MoonScript (http://moonscript.org/) -- See installation section. Make sure moon/moonc are in your PATH so you can use them.

Make a .moon file with the source code in it.

Open up command prompt/terminal, cd to the directory with your .moon file, and type moonc file.moon.
Thx!
LuaWeaver
Party member
Posts: 183
Joined: Wed Mar 02, 2011 11:15 pm
Location: Ohio, USA

Re: MoonScript performance isuess?

Post by LuaWeaver »

Compile time only happens at the beginning, so no, no "lag". You may experience slightly slowed _startup_ time, but it's laughable.
"your actions cause me to infer your ego is the size of three houses" -finley
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 263 guests