r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Profiling] Rebol code optimisation and algorithm comparisons.

Ladislav
2-Jun-2010
[438x3]
>> time-block [now/precise] 0,05
== 2.11906433105469E-6
so, the time granularity of XP running in VirtualBox looks smaller, 
than when running natively
funny
PeterWood
2-Jun-2010
[441]
From a quick browse of the Virtual Box User Manual, a VM uses the 
host systems "time stamp counter" by default. There are a number 
of options to change the "guest clock".


It's section 9.10 in the Virtual Box User Manual if you want to take 
a look.
Davide
2-Jun-2010
[442]
>> time-block [now/precise] 0,05
== 2.328125E-6
Gabriele
3-Jun-2010
[443x4]
>> time-block [now/precise] 0,05
== 2.43203125E-5
>> time-block [now/precise] 0,05
== 1.526171875E-5
>> time-block [now/precise] 0,05
== 2.44140625E-5
>> time-block [now/precise] 0,05
== 2.42890625E-5
>> time-block [now/precise] 0,05
== 2.4203125E-5
>> time-block [now/precise] 0,05
== 2.4265625E-5
>> time-block [] 0,05
== 1.11503601074219E-8
>> time-block [] 0,05
== 1.11885070800781E-8
>> time-block [] 0,05
== 1.11618041992188E-8
>> time-block [] 0,05
== 1.12886428833008E-8
Max: scratch your theory, this is Linux running on an iMac 24"
(btw, i guess Linux is doing timezone conversion in the time system 
calls, while osx is not, and that would explain the huge difference 
in speed.)
BrianH
4-Jun-2010
[447]
Steeve, could you submit your CureCode #574 DP function to DevBase? 
Or can I? Good work, and it uses well features introduced to R3 since 
DP was originally written. We would do well to have this function 
:)
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.