Email list hosting service & mailing list manager

Several comments Michael Burschik (08 Apr 2003 10:30 UTC)
Re: Several comments Taylor Campbell (08 Apr 2003 12:04 UTC)
AW: Several comments Michael Burschik (08 Apr 2003 12:50 UTC)
Re: Several comments David Rush (23 Apr 2003 08:44 UTC)
AW: Several comments Michael Burschik (23 Apr 2003 09:07 UTC)

AW: Several comments Michael Burschik 23 Apr 2003 09:05 UTC

> > Given a not too inefficient implementation of vector-reverse, which
> > should be possible, the whole issue of left/right iteration
> > would seem rather pointless.
>
> Actually for vectors having the different left/right iterators is more
> important because a reverse is entirely unnecessary. It's just a
> decrementing integer loop instaed of an incrementing one.
> There's a big efficiency gain here.

In general, you are right. However, a really efficient implementation of
vector-reverse might simply toggle a left/right flag in the vector itself.
Given copy-on-write, one would not even have to copy the vector in many
cases.

Efficiency, however, is a two-edged knife. Some things can be handled
efficiently by the machine, other things can be efficiently handled by
the human brain. Unfortunately, the intersection is not very large. And
my brain, at least, is more comfortable with

(vector-map f (vector-reverse v))

than with

(vector-map-right f v)

Naturally, your mileage may vary.

Regards

Michael Burschik