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 <[EMAIL PROTECTED]> wrote: > On 11/22/05, Zbigniew <[EMAIL PROTECTED]> 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 > _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
