I thought using a counting expression would be a simple way to benchmark a 
system. My results are disturbing, however. Consider my original expression:

forever [ t: now
              c: 1
              while [ now = t ][ c: c + 1 ]
              print c
              c: copy []
]

Here are the results of running the expression on an Intel Celeron 
333MHz workstation running Windows NT 4 (66MHz bus) with Pegasus and 
Microsoft Excel both open at the same time:

37594
37261
37103
37313
37555
37551
37274
37472
37563
37195
37539
37556
37496
37579
37386
37540
37108
>>

Now here are the results of running the expression on a dual Intel 
Celeron 433MHz machine (66MHz bus) running BeOS 5 Pro (with no 
additional applications open):

11607
11652
11649
11630
11713
11682
11595
11606
11538
11745
11693
11529
11456
11444 

As you can see, the expression counted many more times-per-second on 
Windows NT 4 than on BeOS 5 Pro.

In fact, REBOL on Windows NT 4 counted more than three times as high 
per-second than REBOL on BeOS 5 Pro. This is despite the fact BeOS 5 
Pro was running on twice the hardware and then some.

Examination: REBOL does not seem to utilize both processors 
simultaneously, instead it seems to alternate their use, which means
the processors lose their cache information each time. Perhaps the 
REBOL for BeOS binary is three times as slow as the binary for Windows 
NT?

I used Carl's expression...

t: now/time n: 1 while [n < 1000000] [n: n + 1] n / third (now/time - t)

and here are the results:

The Windows NT machine returned a result of 500,000
The BeOS 5 Pro machine (dual processors) returned a result of 250,000

I posted these results to the beusertalk mailing list and the response was that the 
compiler used to create the BeOS binary must be far less superior than the compiler 
used to create the Windows NT binary (which compiler did RT use for this? I know 
BeOS R5 ships with a much better compiler than previous IDEs.) The response also 
was that perhaps the code used to create the BeOS binary requires some 
optimization.

The BeOS seems to return much better benchmark results using other criteria (e.g. 
OpenGL frame rates) than using a REBOL counting expression as a benchmark.

Is the code for the BeOS binary written to take advantage of BeOS' 
multithreadedness and for SMP? I gather from watching my Pulse meter while 
running the REBOL expression that REBOL does not utilize SMP like it could on the 
BeOS.

-Ryan

> Also, WRT calling NOW in a loop.  Note that it is very expensive on some
> systems!  Compare the loop timing on this line to that below that calls
> NOW.  It takes nearly 10 times longer (under WinNT) if you call NOW. 
> Ryan's loop should be up in the 400000 range rather than 38000.  Amazing,
> isn't it.
> 
> t: now/time n: 1 while [n < 1000000] [n: n + 1] n / third (now/time - t)
> 
> -Carl

Reply via email to