-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
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 0statements from high level constructs. When using manual jumps/else_jumps the user might save space by not including anifstatement for single conditions, but for high level constructs it's not possible. - Replacing
0.0fwith0- 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.
Reactions are currently unavailable