Optimizations
OptimizeToGlobals: If the compiler can prove that a function is not recursive and runs atomically(single threaded), it gets rid of the function’s primitive local variables, which improves performance as scratch’s list operations are more expensive than local variables
InlineSingleUseVariables: Pretty self explanatory, if a variable is only used once, it will be inlined
ConvertToHeapAccess: I did optimizations on the normal heap converter so that it doesn’t allocate a stack pointer for functions that don’t need one
Images don’t show the OptimizeToGlobals optimization cause the testing function I have for that is too long
Before and after on the RGB function
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.