guile-user
[Top][All Lists]
Advanced

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

Re: Questions about floating numbers, rethink and bug report


From: Dirk Herrmann
Subject: Re: Questions about floating numbers, rethink and bug report
Date: Tue, 16 Oct 2001 22:12:26 +0200 (MEST)

On 16 Oct 2001, Neil Jerram wrote:

>     >> - we already have a general virtualization mechanism -- GOOPS
>     >> -- and so should use that rather than inventing an additional
>     >> mechanism.
> 
>     Dirk> OK, then how would you replace SCM_VECTORP and friends?  How
>     Dirk> does your virtual function lookup mechanism look when using
>     Dirk> goops?  I'm curious, because I currently don't see how
>     Dirk> low-level types can be virtualized using goops without a
>     Dirk> noticeable performance drawback.  Could you give a code
>     Dirk> example for how you would do it, please?
> 
> I'll have a go, and aim to let you know the results by end Friday.

Thanks.

> It may well be that you are right, and that it is impossible to use
> GOOPS without losing a lot of performance, but I'd like to be sure
> that we've checked the possibilities first.

Yes, in principle you are right.  And, if I understand things right, GOOPS
will once be capable of replacing smobs and similar stuff, or at least put
it under a common mechanism.  But, for that to happen - at least that's my
understanding - some things still need to be added, among them a clean API
that allows for better interaction with C datatypes and also will allow
for fast classes with performance similar to smobs.

> Had you already considered and rejected using GOOPS before I mentioned
> it?

Not really, because I have not used it for myself yet.  But, I have taken
a look into how GOOPS works and from that I have the impression that it is
not capable (yet) for replacing smobs in an efficient way.

However, the main problem will be to select a good way to virtualize the
strings and vectors - using GOOPS or not.  If that is done, it won't be a
big deal to switch things later:  We will most probably stick to the
current way of using macros like SCM_VECTORP and such.  If SCM_VECTORP
expands to the GOOPS way of determining the type or if it does it as
currently, checking the bit pattern in the cell header, this doesn't make
a difference.

Best regards
Dirk Herrmann




reply via email to

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