Add JIT optimization booster shot
This commit is contained in:
parent
504e2e0ee8
commit
820588b5e7
@ -2,6 +2,7 @@ local module = {}
|
||||
|
||||
local bit = require('bit')
|
||||
local ffi = require('ffi')
|
||||
local jit = require('jit')
|
||||
|
||||
local u32 = ffi.typeof('uint32_t')
|
||||
local u64 = ffi.typeof('uint64_t')
|
||||
@ -16,6 +17,8 @@ typedef union {
|
||||
} Reinterpret;
|
||||
]]
|
||||
|
||||
if jit and jit.opt then jit.opt.start("maxsnap=1000", "loopunroll=500", "maxmcode=2048") end
|
||||
|
||||
local function truncate(num)
|
||||
if num >= 0 then
|
||||
return math.floor(num)
|
||||
|
Loading…
x
Reference in New Issue
Block a user