multiple-value-bind 
Author Message
 multiple-value-bind

Concerning multiple-value-bind and speed, in MCL 2.0

(multiple-value-bind (a b) (values 1 2)
  (print a) (print b))

expands to:

(MULTIPLE-VALUE-CALL
  #'(LAMBDA (&OPTIONAL A B &REST #:IGNORE)
      (DECLARE (IGNORE #:IGNORE))
      (PRINT A) (PRINT B))
  (VALUES 1 2))

I wonder whether the compiler actually compiles the expansion or
compiles the form directly. Anyway, perhaps it doesn't make any
difference when it comes to speed.

What do other implementations expand multiple-value-bind to?

--
Hallvard Traetteberg
Dept. of Knowledge Based Systems
SINTEF SI (Center for Industrial Research)
Box 124 Blindern, 0314 Oslo 3
NORWAY

Tlf: +47 2 45 29 83 or  +47 2 45 20 10
Fax: +47 2 45 20 40



Sat, 08 Jul 1995 01:17:02 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Defining multiple-values binding forms

2. MULTIPLE-VALUE-BIND question

3. multiple-value binding let and let*

4. lambda list in MULTIPLE-VALUE-BIND?

5. with-slots and multiple-value-bind

6. Common Lisp summary and multiple value binding

7. let vs. multiple-value-bind

8. (let (flet (multiple-value-bind (etc.))))

9. Final SRFI 8: RECEIVE: Binding to multiple values

10. SRFI 8: RECEIVE: Binding to multiple values

11. binding multiple values (Ex: Re: some small proposed changes to standard)

12. (values (multiple-value-form)) whats the point?

 

 
Powered by phpBB® Forum Software