sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

Performance of lua calling C + + sol function

Open w4454962 opened this issue 3 years ago • 2 comments

xx1 xx2

Type checking is not enabled, but why does the number of parameters increase and the running time double

w4454962 avatar Sep 09 '22 11:09 w4454962

If "lua_tointeger" is used to increase parameters, the runtime will not be increased, and it is fixed at 0.2S

w4454962 avatar Sep 09 '22 11:09 w4454962

I found that after changing int to float, it was normal. Maybe I used luajit, and sol would have more float2int behavior. Even if luajit provided "lua_tointeger", sol would not use it directly

w4454962 avatar Sep 09 '22 18:09 w4454962