chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] call-with-values speed


From: Zbigniew
Subject: Re: [Chicken-users] call-with-values speed
Date: Tue, 22 Nov 2005 12:55:58 -0600

You are correct about the compiled version.  Sorry, I should have
posted my compiled times instead (although many people seem to run
their code in csi, they are probably not doing so for performance
critical code).

I guess the end result was, if I need to return multiple values from a
C procedure, it is about 4 times faster in compiled code to return
them into scheme-objects passed into C.  If such a thing can be
arranged in advance.  It is also a bit faster than using a
let-location, which is still faster than multiple values.

On 11/22/05, felix winkelmann <address@hidden> wrote:
> On 11/22/05, Zbigniew <address@hidden> wrote:
> >
> > Unfortunately, I found that handling multiple values is very slow.  In
> > fact, if you cannot use the method I mentioned above (the fastest), it
> > is much faster to construct and deconstruct a list or cons with 2
> > values than to process multiple values.  I provide some timing below.
> > I do not personally care if values are fast, as I have other
> > satisfactory workarounds; it is just interesting.  I didn't find any
> > mention of it in the mailing list archives, though.
> >
>
> Yes, multiple values need more processing, but when compiling
> the code you will find that the list-based approach is in the end "only"
> twice as fast as the multiple values solution (running the test in the
> interpreter isn't that representative, really).
> But, yes, it's not that multiple values are slow, it's that allocation
> (as in the list-case) is quite fast...
>
>
> cheers,
> felix
>




reply via email to

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