Technically, it uses less RAM.
A statement like z=a+b<<4+c<<8+d<<12
Will create 3 T variables to hold the intermediate results.
Each T var is a Word (Long for PBPL), so it uses at least 6 more bytes of RAM.
Of course, if the program already had T vars from other statements, it won't make any difference.
For Flash, it uses 6-8 words depending on variable locations.
z=a+b<<4+c<<8+d<<12, uses ~60 depending on library routines already used.
And Time wise, it takes about 6-8 uS @ 4Mhz
z=a+b<<4+c<<8+d<<12, uses several hundred.
<br>


I might have coded it like Steve(mister_e) here and just got the job done. But, I guess, this is how compiler writers optimize their code generation capabilities. I would like to hazard a thought that this kind of optimisations would help PBP generate tighter code.



Bookmarks