more ShockScript optimization--now 10x faster!!

1 min read

Deviation Actions

shock-value's avatar
By
Published:
1.2K Views
Well, I once again got into the guts of ShockScript and made some strictly under-the-hood changes. Mostly I greatly reduced the usage of untyped variables (which are slower than strictly typed ones).

The result is a 10x speedup, at least in some cases (could be higher or lower in others, I have not done extensive benchmarking yet). Specifically a dumb loop that iterated 20,000 times and set a variable on each iteration took about 1.1 seconds on the pre-optimization ShockScript; it now takes about 0.12 seconds.

I still have some glitches to work out (not all of my ShockScript code compiles without errors yet) but simple examples work fine with a great speedup.
© 2009 - 2024 shock-value
Comments4
Join the community to add your comment. Already a deviant? Log In
DarkQkyu's avatar
Wait, so do you have any looping errors still, such as script loop errors? =x