13.05.2017, 16:38
by minute value.I will explain why ++var is faster than var++.
var++ is postincrement operator which will take the copy of the var and then increment it and assigns.
++var is preincrement operator which will take the memory address (call by reference) and increments the value and does not require a temporary copy.
var++ is postincrement operator which will take the copy of the var and then increment it and assigns.
++var is preincrement operator which will take the memory address (call by reference) and increments the value and does not require a temporary copy.