With respect to excel vba on another site - a member quoted:
"As a rule of thumb never use integer".
With no disrespect to the member I at first thought this was a slightly bold statement. But perhaps its not?
My understanding is that the underlying VB engine converts integers to long even if its declared as an integer. Therefore a slight speed decrease can be noted. I have believed this for some time and perhaps thats also why the above statement was made, I didnt ask for reasoning.
So we should be using long right? Unless anyone has a good reason why we should'nt?
Also always using long will prevent rare integer overflow errors. Like when programmers make the classic mistake of dimensioning rows as integers.
Try the variable speed test attached. Credit to the original author.