Seeing that people enjoyed that last benchmark, I offer this
translation of the Java Tak benchmark.

Here are my results:
  REBOL       .76   seconds
  JavaScript  .54   seconds
  Java        .0071 seconds

You might be interested in these web sites:
http://www.rahul.net/rhn/bench.js.html
http://www.rahul.net/rhn/bench2.html

REBOL [
    Title:   "TAK Benchmark"
    Date:    11-11-1999
    File:    %tak.r
    Author:  "John C."
    Email:   [EMAIL PROTECTED]
    Purpose: {
        Simple benchmark ported to REBOL.  Computes the Takeuchi
        function.  To use, run the function BENCH.  It will print
        out the result of tak 18 12 6 (which should be 7) and the
        amount of time needed for one iteration of the program.
    }
    Category:  'general
]

tak: func [x y z] [
    either not (y < x)  ; do not `optimize'
        [z]
        [tak tak x - 1 y z
             tak y - 1 z x
             tak z - 1 x y]]

bench: func [] [
    start: fourth now
    result: loop 100 [tak 18 12 6]
    end: fourth now
    print [result (end - start) / 100]
]




______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to