[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] 2.6.6 errors on SuSe 9.1
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] 2.6.6 errors on SuSe 9.1 |
Date: |
14 Feb 2005 10:46:40 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Andrei Zorine <address@hidden> writes:
> Hello, Lis{t,p}ers!
> I have two questions.
>
> I have compiled gcl-2.6.6 on SuSe-Linux 9.1 machine, compilation
> process seemed OK But I get some errors:
> 1. Call to (time (+ 1 2)) produces "Error in - [or a callee]: NIL is
> not of type NUMBER." This error was also in 2.6.3, but I hoped it'd go
> away in new version of gcl
I can't reproduce this, see below.
> 2. (room) gives "Error in NTH [or a callee]: Expected a FIXNUM" Same
> as in 2.6.3
>
Nor this:
GCL (GNU Common Lisp) 2.6.6 CLtL1 Jan 18 2005 00:13:38
Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
Binary License: GPL due to GPL'ed components: (READLINE 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.
>(time (+ 1 2))
real time : 0.000 secs
run-gbc time : 0.000 secs
child run time : 0.000 secs
gbc time : 0.000 secs
3
>(room)
211/211 40.3% CONS RATIO LONG-FLOAT COMPLEX STRUCTURE
2/28 27.1% FIXNUM SHORT-FLOAT CHARACTER RANDOM-STATE READTABLE
SPICE
47/49 72.6% SYMBOL STREAM
1/2 12.8% PACKAGE
1/38 50.0% ARRAY HASH-TABLE VECTOR BIT-VECTOR PATHNAME
CCLOSURE CLOSURE
16/32 86.6% STRING
3/27 97.5% CFUN BIGNUM
6/115 87.8% SFUN GFUN VFUN AFUN CFDATA
411/512 contiguous (108 blocks)
13107 hole
5242 0.0% relocatable
287 pages for cells
19047 total pages
101707 pages available
10318 pages in heap but not gc'd + pages needed for gc marking
131072 maximum pages
I think you have a miscompilation. If you agree, perhaps you could
post your build output.
> The reason I went for 2.6.6 was slow-down after declare'ing variables
> in a function. I played with a Mersenne number tester:
>
> (defun $mersenne(n)
> (let* ((L 4) (q (integer-length n)))
> ;(declare (type integer L q))
> (cond ((<= q 2) (error "q must be >2")))
> (dotimes (i (- q 2) (= 0 (mod L n)))
> (setq L (mod (- (* L L) 2) n)))))
>
> This function compiled as is ran faster than one compiled with
> (declare...) uncommented. The time difference was about 0.5 sec, which
> is significant for 2.8GHz P4 ( I tried n=2^11213-1 ).
>
The issue here with the declaration is that gcl has hooks in place to
handle bignum arithmetic through direct calls to gmp3 functions, but
many arithmetic operations are not yet optimized to take advantage of
this. You can see this from the output of (disassemble '$mersenne).
L can be stored directly as a gmp integer, not as a lisp object, but
must be promoted to a lisp object whenever some operation thereon is
called for which no gmp integer implementation has yet been written.
The conversion back and forth accounts for the time difference.
This is an area we could work on for 2.7, but I don't know what the
savings (i.e. in calling gmp routines directly from compiled lisp
code) would be. My hunch is they would be minor.
Take care,
> --
> Andrei Zorine
>
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah