The question: Is there a difference between
BENCHMARK WinNT Linux rel. -------------------------------------------------------------------- Fibonacci...9227465 2.086 sec 2.069 sec 1.01 Sieving...1899 1.936 sec 1.912 sec 1.01 Matrix multiply... 1.498 sec 1.480 sec 1.01 bubbling... 2.312 sec 2.256 sec 1.02There is hardly a difference here.
BENCHMARK WinNT Linux rel. -------------------------------------------------------------------- 300,000-times push+pop 3.645 sec 3.640 sec 1.00 (push+pop expected 3.600 sec 3.600 sec 1.00) 300,000-times nop+nop 1.834 sec 1.829 sec 1.00 (nop+nop expected 3.600 sec 3.600 sec 1.00)Almost too good to be true.
BENCHMARK WinNT Linux rel. 1/rel. -------------------------------------------------------------- no-overlap CMOVE : 49.019 MB/s 85.227 MB/s 0.58 1.74 CMOVE> : 53.003 MB/s 57.251 MB/s 0.93 1.08 MOVE 1->2 : 51.194 MB/s 60.240 MB/s 0.85 1.18 MOVE 2<-1 : 52.816 MB/s 58.139 MB/s 0.91 1.10 overlap CMOVE : 45.454 MB/s 52.631 MB/s 0.86 1.16 CMOVE> : 45.454 MB/s 52.816 MB/s 0.86 1.16 MOVE 1<-2 : 72.115 MB/s 90.361 MB/s 0.80 1.25 MOVE 2->1 : 72.465 MB/s 89.820 MB/s 0.81 1.24Amazingly, we see that WinNT is 17.5% slower than Linux 2.0.
Test WinNT Linux rel. -------------------------------------------------------------------- Testing DO LOOP = 0.0430 us 0.0430 us 1.00 Testing * = 0.1150 us 0.1150 us 1.00 Testing / = 0.3530 us 0.3500 us 1.01 Testing + = 0.0490 us 0.0480 us 1.02 Testing M* = 0.1220 us 0.1210 us 1.01 Testing M/ = 0.3330 us 0.3320 us 1.00 Testing M+ = 0.1150 us 0.1150 us 1.00 Testing /MOD = 0.3570 us 0.3560 us 1.00 Testing */ = 0.4110 us 0.4100 us 1.00 Testing Eratosthenes = 0.4762 us 0.4518 us 1.05 Testing Hoare's qsort = 7.9000 us 7.8000 us 1.01 all tests = 2.0300 sec 2.0100 sec 1.01There is no significant difference for this test.
The "unnest/nest pairs" benchmark tests how long it takes to unwind from 32 million nested colon definitions (no loops!).
The SAVAGE benchmark is well-known, Bill Savage wrote it.
FLOAT is a mix of fp operations.
FPMATH was translated by R. L. Smith from an article in Dr. Dobb's Journal, September 1988.
A long time ago I myself posted the Forth DHRYSTONE and WHETSTONE programs here.
BENCHMARK WinNT Linux rel. -------------------------------------------------------------- 1mloop 0.036 sec 0.036 sec 1.00 SuperSieve 1e9 -- 1.001e9 0.722 sec 0.709 sec 1.02 (50181 primes found) 32 million nest/unnest pairs 3.037 sec 2.957 sec 1.03 Savage (floating point) 0.013 sec 0.013 sec 1.00 Float (mix of operations) 0.541 sec 0.499 sec 1.08 Fpmath 0.384 sec 0.325 sec 1.18 Forth Dhrystone 160000 D/s 161550 D/s 0.99 Forth Whetstone 67957 KW/s 64935 KW/s 1.05There is definite slowdown of 18% by WinNT in one benchmark. I made sure these figures are correct by running the tests many times. The mean slowdown is 3%.
The iForth server is build with Borland's C++ 4.5. I do not know if the Borland libraries set up a "cycle stealing scheme" to make Windows programming easier.