Skip to content(if available)orjump to list(if available)

Fast Sequence Iteration in Common Lisp

Fast Sequence Iteration in Common Lisp

4 comments

·December 13, 2025

vindarel

The same day, after this post, SBCL's main developer made reduce faster (https://www.reddit.com/r/lisp/comments/1pmip8o/fast_sequence...). Let's see on the next SBCL release what the final results are.

themafia

Stas is a machine. Almost every single day he's in the sources making improvements. I joined the sbcl-commit list recently and the project is far more active and cared for than I had originally suspected.

matheusmoreira

> sequences are a band-aid over the lack of real iterator protocol

Wouldn't it be better to solve that problem? Proper generalized iteration with generators is just semicoroutines which can be implemented by swapping around stack pointers with zero copying. Should be competitive performance wise.

BoingBoomTschak

As linked, the extensible sequence protocol (https://shinmera.com/docs/trivial-extensible-sequences/) already exists and is quite workable. The problem is that it's not supported enough, both by implementations (CCL missing, for example) and the entire ecosystem.

In the end, it's simpler to stay with boring, ANSI compliant solutions well optimized by compilers.