On 06/21/2010 06:35 PM, Leandro Lucarella wrote:
Andrei Alexandrescu, el 21 de junio a las 17:43 me escribiste:
If efficiency is still sub-par, retro could detect that it's working
with iota and generate specialized code. That's not too difficult;
for integers, retro(iota(a, b)) could actually be a rewrite to
iota(b - 1, a, -1). Figuring out all corner cases, steps greater
than 1, and what to do for floating point numbers is doable but not
trivial either, and works against modularity. Anyway, it does look
like it's all about an implementation matter.

I'm scared, I've heard that in C++ so many times... =)

Particularly in conjunction with iostreams. Their slow speed has been an implementation issue for, what, 26 years and still going strong. :o)

Fortunately, in the case of iota, it's pretty clear what needs to be done.

Andrei

Reply via email to