Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

The worse-is-better / diamond-like jewel release

Choose a tag to compare

@tfeb tfeb released this 30 Jan 13:24
· 15 commits to main since this release

This version gets rid of the in-range iterator, which was an attempt to do a big complex system all-in-one iterator for real ranges. It was far, far too hairy, would not always produce good code and was still buggy. This is an incompatible change, although iterators have never been stable.

Instead there is a new in-naturals iterator which provides dotimes-style iteration over natural numbers: this is almost always all you need.

In addition, stepping, stepping* and stepping-values have optimizers and can provide very fast, more general iteration.

There are some other small improvements: the preexisting 'syntax error' condition type & function is now public, and a few other small changes.

Benchmarks for loops over integers, with a recent SBCL on an M1 machine:

** range 100000, nesting 2
what                                                  seconds      ratio
star/in-naturals                                       12.590      1.000
star/stepping                                          12.564      0.998
loop                                                   12.550      0.997
dotimes                                                12.536      0.996

Same benchmarks with LispWorks 8.0.1 on the same hardware:

** range 100000, nesting 2
what                                                  seconds      ratio
star/in-naturals                                       14.258      1.000
star/stepping                                          10.965      0.769
loop                                                   18.421      1.292
dotimes                                                12.553      0.880

Štar is essentially as performant the built-in iteration constructs.

Worse is better.