Questions tagged [luajit]

LuaJIT is a Just-In-Time Compiler for the Lua programming language. LuaJIT offers more performance, at the expense of portability. On the supported OS's (all popular operating systems based on x86 or x64 CPUs (Windows, Mac OSX, Linux, ...), ARM based embedded devices (Android, iOS) and PPC/e500v2 CPUs) it offers an API- and ABI-compatible drop-in replacement for the standard Lua interpreter.

Overview

LuaJIT is a high-performance, Just-In-Time(JIT) implementation by Mike Pall for the Lua programming language. It has been successfully used as a scripting middleware in games, 3D modelers, numerical simulations, trading platforms and many other specialty applications. It combines high flexibility with high performance and an unmatched low memory footprint: less than 125K for the virtual machine(VM) plus less than 85K for the JIT compiler (on x86).

LuaJIT has been in continuous development since 2005. It's widely considered to be one of the fastest dynamic language implementations. It has outperformed other dynamic languages on many cross-language benchmarks since its first release — often by a substantial margin. In 2009 other dynamic language VMs started to catch up with the performance of LuaJIT 1.x. Well, I couldn't let that slide. ;-)

2009 also marks the first release of the long-awaited 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. An innovative trace compiler is integrated with advanced, SSA-based optimizations and a highly tuned code generation backend. This allows a substantial reduction of the overhead associated with dynamic language features.

It's destined to break into the performance range traditionally reserved for offline, static language compilers.

Compatibility

LuaJIT implements the full set of language features defined by Lua 5.1. The virtual machine is API- and ABI-compatible to the standard Lua interpreter and can be deployed as a drop-in replacement.

LuaJIT offers more performance, at the expense of portability. It currently runs on all popular operating systems based on x86 or x64 CPUs (Linux, Windows, OSX etc.) or embedded systems based on ARM (Android, iOS) or PPC/e500v2 CPUs. Other platforms will be supported in the future, based on user demand and sponsoring.

430 questions
-1
votes
1 answer

how to decompile this anti luajit decompiler?

here is lua - https://drive.google.com/file/d/1H9aDCEFgyMVoL7vikmcvbmMnTimAW2xm/view?usp=share_link what method is this? how to decompile it? I'm new in this area, I don't understand how to decompile this, I hope someone can help
frenzied
  • 7
  • 1
-1
votes
1 answer

If Left click ffi in lua

I'm new to ffi. Basically I'm trying to get a bool when the mouse left button is clicked. I've done some research and found something called WM_LBUTTONDOWN However I don't know how to put it in ffi.cdef then getting a bool.
Adhom X
  • 11
  • 2
-1
votes
1 answer

Is there a way to print text to a screen using LuaJIT and SDL2 without an additional library?

I'm currently using a LuaJIT wrapper for SDL2 (see "anima" on github) but, unfortunately, SDL_ttf was not included in the ffi and I'm having trouble using additional libraries on Windows. Furthermore, the requirements for this project already risk…
-1
votes
1 answer

LuaJIT build failed with NDK, CentOS

I tried to build LuaJIT with Android NDK as the official guide. But some problems happened. I have search for 2 days but can't solve them. Here's my…
Chenhe
  • 924
  • 8
  • 19
-1
votes
1 answer

Printing tensor containing more than 10 columns in Luajit/ torch

I want to print a tensor of dimension 2 X 11 in console. print(tensor) is printing like this Columns 1 to 10 0.2660 0.1791 0.1237 0.0558 0.0810 0.0284 0.0103 0.1185 0.0811 0.0258 0.1408 0.2460 0.1186 0.0831 0.1497 0.0297 0.0094 …
-1
votes
1 answer

Lua multithreading module

I'm looking for multithreading support for Lua/LuaJit. I found http://lua-users.org/wiki/MultiTasking a lot of varians of modules, but I can't find up-to-date module. Can somebody provide me the most useful Lua-threading? It is hardly difficult to…
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
-1
votes
1 answer

LuaJIT FFI cdef doesn't understand 'class'?

class Myuser * MyClient_GetMyUser(AUser aUser); This is the error for trying to declare that function with ffi.cdef: Error: dllImport.lua:861: declaration specifier expected near 'class' at line 20 How is this possible? How would I go about…
theman
  • 345
  • 1
  • 14
-1
votes
1 answer

deepcopying function variable gives unexpected results

I have an object that I create using the following function local function newObject(functionVariable) ... functionVariable = functionVariable or nop ... return setmetatable({ ... functionVariable =…
theman
  • 345
  • 1
  • 14
-2
votes
1 answer

Slow FFI.cast in luajit

Could you please explain low performance of FFI.cast in a following snippet? prof = require 'profile' local ffi = require("ffi") ffi.cdef[[ struct message { int field_a; }; ]] function cast_test1() bytes = ffi.new("char[100000000]") …
Dmitry Vyal
  • 2,347
  • 2
  • 24
  • 24
-3
votes
1 answer

luajit '=' expected near '-'

I have been trying to use luajit to compile luas, which is not relevant right now. However, when I try to enter luajit -h (which should usually list commands) into the cmd looking luajit.exe window, I get the error " '=' expected near '-' ". I have…
1 2 3
28
29