currently i have the following few lines in my code
c = a + b + remainder
Where a and b are < 10 and remainder is an integer of value 0 or 1.
I got to thinking if it would be faster storing remainder as a boolean and then doing
If remainder Then c = a + b + 1 else c = a+b End If
This is part of my string addition script which adds big number in string format together. It's already ridiculously fast for small numbers and the variation of bool and int makes little visible difference.
However, for 2 numbers with > 300 digits+decimals it seems to run in about a THIRD of the time.
Original runtime ~19ms
with bool 'variation' ~ 6ms
So i'm posting this to see if somebody could explain the huge difference in speed, and also as a pointer to other people who might be in the same situation.

New Topic/Question
Reply



MultiQuote




|