Faster Lua VM Released

Synapse is already compatible with the VM and they are already working on a decompiler for it. Don’t rely on this update for game security.

7 Likes

I’ve been hyped for the release of this as a scripter and someone who plays Phantom Forces on a sub-par CPU (irrelevant I know, I had to say this lol)

Very happy with the performance gains in my scripts!

3 Likes

Are there any practices that have been negatively impacted by this? Has anything gotten slower as a side effect? I understand that certain practices are no longer needed/fastest, but was anything slowed down?

2 Likes

As far as we know, there are practices that will make your code run slower than it can, but at the same speed as it used to on the old VM.

2 Likes

Honestly, just don’t use next as an iterator and you’re good. That’s all I can think of off the top of my head.

1 Like

That was actually optimized out!

5 Likes

Now that we’re at release, is there a chance we could get a listing of the optimizations done (beyond a general “everything is faster”)?

6 Likes

Even so, I would never use the word “safe” to describe anything exposed to the client.

Great way to put it.

1 Like

I hadn’t tested it in a while, but yeah, it seems like it has been. Now my code style can go back to being normal.
image

3 Likes

Really happy to see this being rolled out. I look forward most to making detailed game map environments with more interactive elements all while maintaining smooth gameplay performance.

1 Like

Glad to see faster join times (especially when I play Phantom Forces on a mid non gaming laptop), and that exploiting might be harder (for now).

Just to get a better understanding because I only know very basic Lua scripting (I also don’t know other scripting languages). Is this just a change how the client etc communicates with the scripts or is the new Lua actually changed a bit from how you scripted before.

I’m wanting to learn more and get better at scripting so I was just curious about that.

2 Likes

The interpreter is changed. That is, the internal code that reads and runs the Lua code has been entirely rewritten to be faster.

There shouldn’t be any changes to Lua beyond how fast it is when ran.

4 Likes

Amazing, I was testing if an exploiter could lag my game using an RF in studio, but I ran about 10 while true loops (no wait) and it didn’t lag at all! I even printed out the reply since I was expecting my laptop to crash but the fps remained around 60.

1 Like

I’m not sure if it’s just me, but I found that Humanoid:MoveTo() became a little bit inconsistent (given enough use?)

Now the characters in my game can sometimes jitter and teleport around if they lag enough.

4 Likes

Wait so ROBLOX LUA runs on one core? Or am I not understanding what you mean?

1 Like

Correct, Lua execution is single threaded, there is no way to run your code using 2 cores, the only cases that i would assume are technically multi core are things like http requests.

4 Likes

Exciting new update, now I can’t wait for roblox to run on multiple cores and to actually use my 1050Ti instead of my core i5 lol

3 Likes

Were any background things changed in Studio that would cause it to crash whilst editing/closing out of scripts?

I’ve been experiencing a lot of crashing when dealing with scripts/linkedsources/packages since a day ago.

1 Like

Rendering is also done partially on a sepparate thread.

1 Like

What do you exactly mean by this? CPUs are used for logic and GPUs for rendering. Multiple threads will just spread the logic on multiple CPU threads and your 1050ti won’t be affected.

3 Likes