Jump to content

Javascript as a secondary programming language


Recommended Posts

  • 3 weeks later...

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:

 

 

  • Like 1
Link to post

Some benchmark:

Javascript ( with some debug informations ), two times slower than c++

spacer.png

 

Lua ( requires debughook to do not get terminated due infinity loop protection )

8r7ecu9.png

 

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 )

  • Like 1
Link to post
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.

  • Like 1
Link to post
  • 1 month later...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...