Editing BoostC Optimizations
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 6: | Line 6: | ||
− | = some notes from the forum still to be formatted = | + | == some notes from the forum still to be formatted == |
The following post yeilded several real and unreal optimizations | The following post yeilded several real and unreal optimizations | ||
Line 12: | Line 12: | ||
− | == Incrementing == | + | ==== Incrementing ==== |
subtracting/deincrementing is faster than adding/incrementing | subtracting/deincrementing is faster than adding/incrementing | ||
Line 20: | Line 20: | ||
Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | ||
− | == Avoid Division == | + | ==== Avoid Division ==== |
not using division saves ~35 bytes | not using division saves ~35 bytes | ||
Line 28: | Line 28: | ||
Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | ||
− | == Left vs Right Shift == | + | ==== Left vs Right Shift ==== |
Left Shifting is faster than Right | Left Shifting is faster than Right | ||
Line 36: | Line 36: | ||
Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | ||
− | == Function call in ISR == | + | ==== Function call in ISR ==== |
Calling a function in an ISR takes longer than outside an ISR | Calling a function in an ISR takes longer than outside an ISR | ||
Line 44: | Line 44: | ||
Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | ||
− | == Function called Only Once == | + | ==== Function called Only Once ==== |
Never use a function for a single operation, you waste time calling and returning | Never use a function for a single operation, you waste time calling and returning | ||
Line 52: | Line 52: | ||
Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | Post: http://forum.sourceboost.com/index.php?showtopic=2433&pid=9574&mode=threaded&start=#entry9574 | ||
− | == Shift for Division == | + | ==== Shift for Division ==== |
Use bit shifting instead of division for speed savings and possible ram savings | Use bit shifting instead of division for speed savings and possible ram savings |