guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile uses GNU MP


From: Marius Vollmer
Subject: Re: Guile uses GNU MP
Date: 03 Oct 2000 12:21:08 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Jim Blandy <address@hidden> writes:

> > Technically, I despise a huge amount of #ifdefs.  Would it be possible
> > to implement the support for both GNU MP and what we have now by
> > having two separate files, say numbers-gmp.c and numbers-scm.c?
> 
> Well, all the arithmetic operators are generic functions.  Doesn't
> goops make this problem pretty easy to solve?

Yees, but I'm worried about performance.  GOOPS is fast, but somehow I
don't think we should a full blown dispatch whenever two fixnums are
added, for example.

Currently, the arithmetic functions are a special kind of generic
function.  You can add methods to them, but you can't change the
methods that specialize on the builtin numeric types.  In fact the
dispatch to the methods for builtin types are hardcoded into a big
chain of ifs, or something.

Can GOOPS compete with that?  That would be wonderful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]