View Single Post
Old 09-20-2017, 06:57 AM   #5
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,958
Default

Quote:
Originally Posted by Bobflip View Post
Is there any advantage to using *in1 over in1[s]?
I guess this depends heavily on your compiler and settings, but with full optimizations your compiler will probably generate almost the same code anyway, so there is is no real advantage.

That being said, if you have a very tight loop (not too much code, only a few variables), then using pointers will likely be slightly more efficient. However, for loops with a lot of code inside, like ProcessDoubleReplacing(), it is likely that removing the pointers altogether (i.e. let your compiler decide) will be more efficient.
Tale is offline   Reply With Quote