[racket] why does in-indexed / in-range slow down my program?
Hi Danny,
On 01/20, Danny Yoo wrote:
> Oh! I'm sorry. I didn't even look at that part of Peng's email, and
> missed the comment on a faster algorithm. I had no idea what
> "quick-find" or "quick-union" were.
"quick-find" is a naive implementation of the union-find algorithm, which is presented in the book Algorithms (4th edition) written by Robert Sedgewick.
Slow by its nature, it seems to be slowed down further by the usage of "for" and "in-indexed" - and neither Racket Guide nor Racket Reference mention the ineffiencies of this part.
BTW: how can I see the expanded form of the "for" macro?