Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

To Variable or NOT to Variable?

$
0
0
I have never seen anything on whether it is better to use or NOT use variables?
Does one yield faster code than the other?
Does it NOT make a difference as the compiler optimizes either way?

For example:

Doing this:

a = GetA
b = GetB
c = GetC

Call DoThis(a, b, c)

Versus

Call DoThis(GetA, GetB, GetC)

===============
Its a given any variable or parameter will be pushed on (copied to) the stack unless the compiler is optimizing for it.

Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>