[ANN] Sacla loop: a new loop implementation
From: Yuji Minejima (ggb01164_at_nifty.ne.jp)
Date: 09/28/04
- Next message: Rand Sobriquet: "Re: Lisp newby: what is the shortest way to writing GUI lisp program on Windows?"
- Previous message: Rob Warnock: "Re: How to prevent cdr from capitalizing symbols?"
- Next in thread: Gareth McCaughan: "Re: [ANN] Sacla loop: a new loop implementation"
- Reply: Gareth McCaughan: "Re: [ANN] Sacla loop: a new loop implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 14:11:03 +0900
This is part of Sacla project.
http://homepage1.nifty.com/bmonkey/lisp/sacla/index-en.html
You can find the latest sacla loop at.
http://homepage1.nifty.com/bmonkey/lisp/sacla/lisp/loop.lisp
Some design goals of this loop implementation are
* understanding the loop facility by implementing it.
* being as portable as possible.
* producing a good expansion code for a relatively common compiler.
* adopting optimizations which boost the execution speed of idioms which
are commonly used.
* code clarity (I guess I should refine the code more).
Some features which comes to mind are
* when the correct behavior is arguable, followes the behavior of CMUCL's
or GNU CLISP's implementation.
* passes all loop tests in Paul Dietz's ANSI-TEST suite.
* tested to run on CMUCL and GNU CLISP. Probably runs on almost all the
conforming implementation.
* destructuring on the result of multiple-value-list form is transformed
to a multiple-value-setq form, reducing the amout of consing.
e.g. (macroexpand '(loop for (a b c) = (multiple-value-list (foo))))
=> (BLOCK NIL
(LET ((A NIL) (B NIL) (C NIL))
(MACROLET ((LOOP-FINISH NIL '(GO #:LOOP-EPILOGUE-7002)))
(TAGBODY
#:LOOP-BODY-7001
(MULTIPLE-VALUE-SETQ (A B C) (FOO))
(GO #:LOOP-BODY-7001)
#:LOOP-EPILOGUE-7002))))
* when compared to cmucl's loop, attains almost the same execution speed
in cmucl. Some optimizations are omitted, in such cases the speed is
slightly slow. pays more attention to canstant argument cases. The code
size is about half long. (but cmucl's MIT code contains lots of
historical code.)
Any comments are welcome.
Yuji.
- Next message: Rand Sobriquet: "Re: Lisp newby: what is the shortest way to writing GUI lisp program on Windows?"
- Previous message: Rob Warnock: "Re: How to prevent cdr from capitalizing symbols?"
- Next in thread: Gareth McCaughan: "Re: [ANN] Sacla loop: a new loop implementation"
- Reply: Gareth McCaughan: "Re: [ANN] Sacla loop: a new loop implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|