| Posted: 08:42am 06 Aug 2024 |
|
|
|
Yes, INC on its own is very fast
INC n, n is faster than either n * 2 or n << 1
and getting to and from a Sub takes time, but for some style trumps performance.
Edit - even slower!
Sub DEC var, n% If n% = 0 Then n% = 1 Inc Var, -n% End Sub
> q=1000 : dec q : ? q 999 > q=1000 : dec q, 9 : ? q 991 > Edited 2024-08-06 18:49 by phil99 |