Status: New Owner: robhamerling Labels: Type-Enhancement Priority-Medium New issue 88 by robhamerling: code efficiency pwm_common.jal http://code.google.com/p/jallib/issues/detail?id=88
In PWM_common.jal the assembler expansion of _pr2_1 = target_clock / ( 1 * 4 * freq ) _pr2_4 = target_clock / ( 4 * 4 * freq ) _pr2_16 = target_clock / ( 16 * 4 * freq ) is enormous and contains much redundant code. It can probably significantly improved (in terms of program memory occupation) by replacing the last 2 lines with: _pr2_4 = _pr2_1 / 4 _pr2_16 = _pr2_4 / 4 Maybe more optimization is possible by declaring the _pr2_x variables as 'byte*3' or even 'word'. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
