Greetings, and thanks for the report! Here are my results:
============================================================================= 2.7.0 ============================================================================= (defun foo (n x y) (loop for i fixnum below n do (nth x y))) (compile 'foo) (time (foo 100000000 0 nil)) real time : 4.170 secs run-gbc time : 4.160 secs child run time : 0.000 secs gbc time : 0.000 secs NIL (defun foo1 (n x y) (loop for i fixnum below n do (nthcdr x y))) (compile 'foo1) (time (foo1 100000000 0 nil)) real time : 3.640 secs run-gbc time : 3.640 secs child run time : 0.000 secs gbc time : 0.000 secs (defun foo2 (n x y) (loop for i fixnum below n do (si::smallnthcdr x y))) (compile 'foo2) (time (foo2 100000000 0 nil)) real time : 0.620 secs run-gbc time : 0.620 secs child run time : 0.000 secs gbc time : 0.000 secs (defun foo3 (n x y) (loop for i fixnum below n do (nth (the seqind x) y))) (time (foo3 100000000 0 nil)) real time : 0.230 secs run-gbc time : 0.220 secs child run time : 0.000 secs gbc time : 0.000 secs ============================================================================= 2.6.7 ============================================================================= (time (foo 100000000 0 nil)) real time : 0.830 secs run-gbc time : 0.830 secs child run time : 0.000 secs gbc time : 0.000 secs ============================================================================= I've just added a cmp-nthcdr expande and now get: ============================================================================= (defun foo (n x y) (loop for i fixnum below n do (nth x y))) (compile 'foo) (time (foo 100000000 0 nil)) real time : 0.380 secs run-gbc time : 0.370 secs child run time : 0.000 secs gbc time : 0.000 secs NIL (defun foo1 (n x y) (declare (fixnum x)) (loop for i fixnum below n do (nth x y))) (compile 'foo1) (time (foo1 100000000 0 nil)) real time : 0.230 secs run-gbc time : 0.230 secs child run time : 0.000 secs gbc time : 0.000 secs NIL ============================================================================= Hoping this helps with your nqthm times. Take care, Robert Boyer <[EMAIL PROTECTED]> writes: > Thanks for your recent work on NTH and NTHCDR. > > The following two concatenated transcripts seem to show that NTH has slowed > down by maybe a factor of 6 in some cases in the most recent 2.7.0 over > 2.6.7. My guess is that this has to do with in-lining, function calling, or > something like that. > > Bob > > ------------------------------------------------------------------------------- > > % gcl > GCL (GNU Common Lisp) 2.6.7 CLtL1 Sep 1 2005 16:07:23 > Source License: LGPL(gcl,gmp), GPL(unexec,bfd) > Binary License: GPL due to GPL'ed components: (BFD UNEXEC) > Modifications of this banner must retain notice of a compatible license > Dedicated to the memory of W. Schelter > > Use (help) to get some basic information on how to use GCL. > > >(defun foo (n x y) (loop for i fixnum below n do (nth x y))) > (compile 'foo) > (time (foo 100000000 0 nil)) > > > FOO > > > > Compiling gazonk0.lsp. > End of Pass 1. > End of Pass 2. > OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3 > Finished compiling gazonk0.lsp. > Loading gazonk0.o > start address -T 0x840bf10 Finished loading gazonk0.o > #<compiled-function FOO> > NIL > NIL > > > > real time : 0.790 secs > run-gbc time : 0.790 secs > child run time : 0.000 secs > gbc time : 0.000 secs > NIL > > ------------------------------------------------------------------------------- > > % xg > GCL (GNU Common Lisp) 2.7.0 ANSI Feb 25 2006 17:06:40 > Source License: LGPL(gcl,gmp,pargcl), GPL(unexec,bfd) > Binary License: GPL due to GPL'ed components: (BFD UNEXEC) > Modifications of this banner must retain notice of a compatible license > Dedicated to the memory of W. Schelter > > Use (help) to get some basic information on how to use GCL. > Temporary directory for compiler files set to /tmp/ > > >(defun foo (n x y) (loop for i fixnum below n do (nth x y))) > (compile 'foo) > (time (foo 100000000 0 nil)) > > > FOO > > > > ;; Compiling /tmp/gazonk_7557_0.lsp. > ;; End of Pass 1. > ;; End of Pass 2. > ;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, > (Debug quality ignored) > ;; Finished compiling /tmp/gazonk_7557_0.o. > Loading /tmp/gazonk_7557_0.o > start address -T 0xa0ad690 Finished loading /tmp/gazonk_7557_0.o > #<compiled-function FOO> > NIL > NIL > > > > real time : 4.520 secs > run-gbc time : 4.520 secs > child run time : 0.000 secs > gbc time : 0.000 secs > NIL > > > > > > -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gcl-devel