You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SCM has plenty of low hanging fruit with optimizations which can substantially reduce code size, which might be useful for some bigger projects.
Two optimizations are very simplistic and should be easy to implement:
Skipping if 0 statements from high level constructs. When using manual jumps/else_jumps the user might save space by not including an if statement for single conditions, but for high level constructs it's not possible.
Replacing 0.0f with 0 - with former being 4 bytes and latter being 1 byte, script processor evaluates them to identical values. Safe even for comparison commands, as reinterpreting integer 0 as float 0.0 is okay.
More complex optimizations? Would be welcome, but they aren't nearly as trivial:
Simplifying labels - with high level constructs it's very common to see else_jump -> jump -> jump.... In theory they could be optimized and maybe it'd result in size and performance optimizations.
As far as those go, the two simple optimizations are kind of "must have", label analysis is a welcome extra but I am aware that it might be more complex than it sounds, so I wouldn't consider it high priority.
The text was updated successfully, but these errors were encountered:
SCM has plenty of low hanging fruit with optimizations which can substantially reduce code size, which might be useful for some bigger projects.
Two optimizations are very simplistic and should be easy to implement:
if 0
statements from high level constructs. When using manual jumps/else_jumps the user might save space by not including anif
statement for single conditions, but for high level constructs it's not possible.0.0f
with0
- with former being 4 bytes and latter being 1 byte, script processor evaluates them to identical values. Safe even for comparison commands, as reinterpreting integer 0 as float 0.0 is okay.More complex optimizations? Would be welcome, but they aren't nearly as trivial:
else_jump
->jump
->jump
.... In theory they could be optimized and maybe it'd result in size and performance optimizations.As far as those go, the two simple optimizations are kind of "must have", label analysis is a welcome extra but I am aware that it might be more complex than it sounds, so I wouldn't consider it high priority.
The text was updated successfully, but these errors were encountered: