Of course, most people using Lua seriously use LuaJit, which is surprisingly fast. However it's very prone to the branching problems you described earlier for complex application code. I believe LuaJit does optimise hashmaps when they're used as arrays etc. LuaJit really shines when used for something with a really tight inner loop with perhaps a couple of main branches - it's used for packet filtering, for example, and it's possible to get more or less the same performance as C under those restricted conditions but with dynamic adaptation to traffic conditions for things like DDOS attacks.
One thing that LuaJit does offer is much better control over memory layout than Java/JS etc. You can manually allocate blocks of memory and treat them as arrays of floats etc - it would be interesting to see how fast it would run something like a raytracer or a mandelbrot calculation, I'd imagine it could get pretty fast. On 27 April 2016 at 09:01, Timothy Baldridge <tbaldri...@gmail.com> wrote: > > Ask all the game people who use Lua big time.... > > See that's the problem. When we say "horses for courses" we have to > actually dig down into what we're saying there. The reason Lua is used in > the gaming community is that it's quite fast, very very small, and simple > for what it does. It also has a fairly decent JIT (in the form of LuaJIT). > But it's still an interpreted language, with a very basic set > of data-structures (basically hash-maps for everything even arrays). > > So yeah, the reason it's used in the gaming community is that integrating > the interpreter is fairly easy, and it's "fast enough" to be used for game > logic. But I seriously doubt anyone picked Lua because it had a world-class > GC (because it doesn't), or because out-performed other languages. > > > > On Tue, Apr 26, 2016 at 2:30 PM, Raoul Duke <rao...@gmail.com> wrote: > >> Horses for courses. Ask all the game people who use Lua big time. :-) >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > “One of the main causes of the fall of the Roman Empire was that–lacking > zero–they had no way to indicate successful termination of their C > programs.” > (Robert Firth) > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.