09-16-2021, 06:59 AM
No, unfortunately there is not. You might search in this forum and might find some questions and answers.
The reason for this is people will go to write "Bad code" just for speed. The compiler goes better and better optimizing.
For example:
variable = variable + 1 will be internally converted to variable++ by the compiler.
Multiplying or dividing integer by powers of 2 will become << and >> internally.
etc...
There are still many optimizations pending to be implemented but they will eventually arrive.
Two tips:
If possible "cache" value in variables:
will be faster if you do:
Change it to ELSEIF:
This is equivalent to a switch( ) (SELECT CASE) in other languages, and is faster.
Anyway if you find something running slow, just ask.
The reason for this is people will go to write "Bad code" just for speed. The compiler goes better and better optimizing.
For example:
variable = variable + 1 will be internally converted to variable++ by the compiler.
Multiplying or dividing integer by powers of 2 will become << and >> internally.
etc...
There are still many optimizations pending to be implemented but they will eventually arrive.
Two tips:
If possible "cache" value in variables:
Code:
FOR i = 1 to a * x + 3
...
Code:
LET last = a * x + 1
FOR i = 1 to last
...
[code]
SELECT CASE is not implemented, but you can use ELSEIF.
If you have something like:
[code]
IF a = 1 THEN
...
END IF
IF a = 2 THEN
...
END IF
IF a = 3 THEN
...
END IF
...
Code:
IF a = 1 THEN
...
ELSEIF a = 2 THEN
...
ELSEIF a = 3 THEN
...
ELSE
...
ENDIF
This is equivalent to a switch( ) (SELECT CASE) in other languages, and is faster.
Anyway if you find something running slow, just ask.