This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.
On 19-Jun-06, at 1:15 AM, Per Bothner wrote:
Marc Feeley wrote:I repeat: in which implementations of Scheme will the multiple values API be faster than the equivalent pair of operations which return single values?Ones in which the operation can be inlined by a compiler.
Yes, that's what I meant, and specifically the fixnum operations.
Of course inlining may be contrary to a strict reading of at least R5RS, unless you're doing whole-program compilation, which further reduces the value of standardizing these functions.
The module system in R6RS will (probably) forbid mutation of global variables bound to predefined procedures, so this should not be a problem. In R5RS a compiler could use speculative inlining of the predefined procedures (that's what Gambit-C does, I can email you a paper on the subject if you are interested).
> I find SRFI 77's complexity to be a real turn-off when Iconsider the changes required to implement it properly. Surely I'm not the only implementer to feel this way.You're not. Though a tuned reference implementation that makes uses of a small number of implementation-optimized primitives would help. But please note that in some implementations "efficient fixnums" may mean unboxed C/C++/Java values rather than general Scheme values. Some of us need to be able to classify at compile time whether a name or expression is a boxed object or an unboxed native number. Similar for floating point - that is even more common, I suspect.
I agree. Marc