This is where we stand so far

     Program:    test1    test2     test3    test4    test5
  Iterations:      500     1000     10000     1000   100000

  S-PLUS 3.4:     18.3      9.0      38.4     31.0    232.9
  S-PLUS 5.1:     75.0    152.6     317.1    544.8    224.1
    R 0.90.1:     56.5      5.7      47.0     18.1     27.9

  S-PLUS 2000:    13      27        24       90       29

Once again, this should be compared with XLISP-STAT. I only
did test5, because these things are so boring.

>  (defun test-5 (n)
     (let ((k 0))
        (dotimes (j n)
           (let ((v (vector 1 2 j j 3)))
              (if (= (aref v 1) 2) (incf k))))))
TEST-5
>  (time (test-5 100000)
)
The evaluation took 1.88 seconds; 0.23 seconds in gc.
NIL
>  (compile 'test-5)
TEST-5
>  (time (test-5 100000))
The evaluation took 0.35 seconds; 0.05 seconds in gc.
NIL

Thus the raw lisp version takes 1.88 seconds and the byte-compiled
version 0.35 seconds. By increasing the memory somewhat, and by
using a typed vector for v we may be able to speed this up another
fraction. For the time being, it seems that XLISP-STAT, on this
test, is about 100 times as fast as the fastest versions of S.

-- 
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
US mail: 8142 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: [EMAIL PROTECTED]
    http://www.stat.ucla.edu/~deleeuw and http://home1.gte.net/datamine/
============================================================================
          No matter where you go, there you are. --- Buckaroo Banzai
                   http://webdev.stat.ucla.edu/sounds/nomatter.au
============================================================================


===========================================================================
This list is open to everyone.  Occasionally, less thoughtful
people send inappropriate messages.  Please DO NOT COMPLAIN TO
THE POSTMASTER about these messages because the postmaster has no
way of controlling them, and excessive complaints will result in
termination of the list.

For information about this list, including information about the
problem of inappropriate messages and information about how to
unsubscribe, please see the web page at
http://jse.stat.ncsu.edu/
===========================================================================

Reply via email to