OptoScript vs Action Block

Was hoping to gain some insight on this topic - is OptoScript faster than Action Block when performing something like the following function?

image
*correction to my code, I have made the elseif statement a regular if statement now.

image

These perform exactly the same function, however I have only recently started using OptoScript and I am a fan of this, however I don’t want to swap a whole heap of functionality out if it isn’t going to increase performance a whole heap. I like the action block due to debugging.

There shouldn’t be any significant performance difference - I would expect both of these to “compile” down into similar (if not the same) forth statements (elseif correction considered).

Do what works best for you.

3 Likes