Hello community!
For a couple of weeks I took a break from Lua/Love2d untill now, when I saw Moonscript witch seems pretty cool but I have one simple question and that is: If I am going to use MoonScript will I have any performance issues because i saw that MoonScipt compiles to Lua and Lua complies to byte code(if I am not wrong) so this means much more time to complie and maybe this means lag?
What do you think does it wroth to learn it?Or it is a waste of time?
P.S :Before you ask why I want to switch from Lua to MoonScript ,because of classes,operators and things like this I think it looks more like C#,Java and more elegant.
MoonScript performance isuess?
Re: MoonScript performance isuess?
There's only one answer to this kind of questions:
MEASURE.
But I'm pretty sure it will get slow if you gonna use it's special features extensively, as they gonna work on top of plain Lua. It's like C++ itself just as fast as plain C, but once you start going hard on classes/templates/whatever it's starting to have performance issues.
MEASURE.
But I'm pretty sure it will get slow if you gonna use it's special features extensively, as they gonna work on top of plain Lua. It's like C++ itself just as fast as plain C, but once you start going hard on classes/templates/whatever it's starting to have performance issues.
Re: MoonScript performance isuess?
I really need a simple hello world example in moonscript because i cant figure out how to compile it
Twitter: https://twitter.com/Murii5
Re: MoonScript performance isuess?
Then why would you even want to use it? Is syntactical sugar really means that much for you? I'm a C coder so I don't have a habit to value these kind of things at all.
Re: MoonScript performance isuess?
i think the compile time would be insane.
but im not the best here at things like that so it may not be true.
but im not the best here at things like that so it may not be true.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: MoonScript performance isuess?
Of all the pros and cons of MoonScript, compilation time is not an issue you should be concerned with.
Help us help you: attach a .love.
Re: MoonScript performance isuess?
but why not you just a use a library similar to lovelymün or something like that?
Re: MoonScript performance isuess?
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.
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.
Re: MoonScript performance isuess?
Can you explain me how to compile moon into lua?Perhaps a simple example would be fine!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.
Twitter: https://twitter.com/Murii5
Re: MoonScript performance isuess?
Install MoonScript (http://moonscript.org/) -- See installation section. Make sure moon/moonc are in your PATH so you can use them.Murii wrote:Can you explain me how to compile moon into lua?Perhaps a simple example would be fine!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.
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.
Who is online
Users browsing this forum: Google [Bot] and 2 guests