finds.dev← search

// the find

cateatcatx/UnityScriptPTest

★ 20 · C · updated May 2017

Unity中Tolua、SLua、XLua与ILRuntime效率对比

A 2017 benchmark comparing four Unity scripting hotswap approaches — ToLua, SLua, XLua, and ILRuntime — measuring call overhead for common operations. Aimed at Unity devs who need to decide which Lua binding or IL interpreter to use for hotfix/hotupdate workflows on iOS where JIT is unavailable.

The comparison covers the approaches that actually mattered in 2017 Unity mobile development. Including ILRuntime alongside the Lua bindings is the right call — it's a meaningfully different tradeoff (C# vs Lua). The repo ships runnable Unity projects for each candidate rather than just publishing numbers, so you can rerun on your own hardware.

Nine years old and untouched — Unity has moved significantly, IL2CPP behavior has changed, and XLua in particular has had major optimizations since 2017, so the numbers here are historically interesting at best. There is essentially no documentation beyond a link to a CSDN blog post that may or may not still exist. The benchmark scenarios are narrow and synthetic; there's no test covering the things that actually hurt in production (cross-boundary delegate churn, reflection-heavy serialization, GC pressure from value type boxing). ILRuntime has also evolved into a completely different project since this snapshot.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →