Sparkiy / sparkiy-client-w81

Sparkiy Windows and Windows Phone clients repository
http://sparkiy.com/
Other
0 stars 0 forks source link

Move to managed lua #74

Closed AleksandarDev closed 9 years ago

AleksandarDev commented 9 years ago

Use NLua

AleksandarDev commented 9 years ago

Pure C# Lua NLua is ~10x slower than C implementation.

Tested with for loop

local c = 0
for i = 1, 100000 do
    c = c + 1
end
Implementation Score
C (C++) + C++/CX 3-7ms
NLua Pure C# Optimized 43-50ms

I decided to not implement Cross-Platform Lua. Rather, each implementation will be done separately for performance reasons.