View Single Post
Old 04-06-2014, 08:45 PM   #6411 (permalink)
MisterSid
EcoModding Lurker
 
Join Date: Mar 2014
Location: New Zeland
Posts: 4
Thanks: 0
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by Astro View Post
I had to look up a wiki to find out what >> did in C programming language.
(One day i will have to learn C.)
A bitwise shift. Very neat.
Sometimes readability needs to take a back seat to performance. After all that's what comments are for.
Bitwise shift is a much faster alternative to multiply/divide by factors of 2 and a good complier will usually look for places where it can switch out actions like multiply by 32, divide by 1024 etc. and replace them for you. When looking for speed improvements it is often wise to decomplie the .hex file to check though.

Paul: Feel free to email the dsPIC code at any stage.

  Reply With Quote
The Following User Says Thank You to MisterSid For This Useful Post:
MPaulHolmes (04-06-2014)