CrosRoad95 62 Posted January 18 Share Posted January 18 Few days ago i started discussion about javascript in mta, for more details checkout https://github.com/multitheftauto/mtasa-blue/discussions/2008 I'm waiting for opinions, suggestions, and everything what can help, here, on at github I already made working "hello world" example 1 Link to post
Simple0x47 298 Posted January 22 Share Posted January 22 I'd rather see Python or C# implemented, as alternative scripting, before JS. 2 Link to post
xLive 87 Posted February 6 Share Posted February 6 On 22/01/2021 at 05:24, Simple0x47 said: I'd rather see Python or C# implemented, as alternative scripting, before JS. Link to post
Haxardous 69 Posted February 11 Share Posted February 11 afaik v8 (MTA JS implementation that CrosRoad95 working on) isn't working as Slipe (NanoBob's C# "translator") - Slipe: C# (csharp.lua) > Lua > C++ - V8: JS > C++ On 06/02/2021 at 17:16, xLive said: 1 Link to post
CrosRoad95 62 Posted February 12 Author Share Posted February 12 Some benchmark: Javascript ( with some debug informations ), two times slower than c++ Lua ( requires debughook to do not get terminated due infinity loop protection ) Js is faster in this case because "add" function was called simillar each time, calling same function with different arguments ( mostly different types ) may cause performance to degradate ( Jitted functions get deoptimized ) 1 Link to post
NanoBob 86 Posted February 19 Share Posted February 19 On 11/02/2021 at 19:30, Haxardous said: afaik v8 (MTA JS implementation that CrosRoad95 working on) isn't working as Slipe (NanoBob's C# "translator") - Slipe: C# (csharp.lua) > Lua > C++ - V8: JS > C++ That is true, the current Slipe (which we call "Slipe Lua") translates the C# code to Lua before running it. But this still gives you plenty of benefits. We are however also working on a way to run native C# code on an MTA Server, which we are doing by creating the MTA server itself from scratch. 1 Link to post
CrosRoad95 62 Posted April 2 Author Share Posted April 2 https://github.com/multitheftauto/mtasa-blue/pull/2169 draft pull request created 1 Link to post
Recommended Posts