Performance of implicit vs explicit conversion.
Posted on 2003-03-28
Is there any performance gain/loss between using implicit vs explicit conversions?
Which of these code sections will perform more efficiently, a or b?
Section 'a' will perform an explicit conversion of CLng(y) + 100 to a string, while section 'b' will allow visual basic to do an implicit conversion. I had heard years ago that explicit conversions are faster than implicit.
dim x as string
dim y as string
y = "100"
x = CStr(CLng(y) + 100)
x = CLng(y) + 100