World: r3wp
[Profiling] Rebol code optimisation and algorithm comparisons.
older | first |
Steeve 4-Jun-2010 [448] | As you wish Brianh |
Maxim 27-Jan-2011 [449] | some things are stunningly non-obvious when it comes time to optimize REBOL >> a: 1x1 b: 10x10 s: now/precise loop 1000000 [second b - a] difference now/precise s == 0:00:00.5 >> a: 1x1 b: 10x10 s: now/precise loop 1000000 [b/y - a/y] difference now/precise s == 0:00:00.969 |
Henrik 27-Jan-2011 [450] | so, pair refinements are slow? |
Maxim 27-Jan-2011 [451x2] | all path access is slow...but I woudn't have thought that using a series function and multiplying both values in the pair would be twice as fast! |
in my mind it would have been roughly equivalent. | |
Henrik 27-Jan-2011 [453] | that's very interesting for DRAW blocks. I wonder if R3 has the same issue. |
Maxim 27-Jan-2011 [454x3] | just tried it... A100 in R3 they *are* roughly equivalent :-) in fact in R3 the second version is ~ 10% FASTER ! |
so, claims that the path access is faster in R3 seems to be true across the board | |
btw the first version is exaclty the same speed as in R2, on my system. | |
Steeve 27-Jan-2011 [457x2] | I don't use first, second, third .... anymore in R3. |
when I have the choice, indeed | |
Maxim 27-Jan-2011 [459:last] | yeah, its much easier to read. I only use first/second in R2 because their faster. |
older | first |