takes 100ms. > While it would of course be ideal for our compiler to efficiently > handle expressions 10000 levels deep (if it can be done without > sacrificing maintainability), dealing with such pathological cases > should not be a high priority, IMO. There are many more important > things to work on. > > Is this just an academic exercise, or does Lilypond generate massively > huge expressions like this? LilyPond evaluates a lot of one-shot expressions in the course of its operation, including complex ones. But Guilev2 offers enough other stumbling blocks. We have not yet arrived at a state where it would even be possible to evaluate performance. I tripped over this problem here merely while trying to find a persuasive example for benefits of improving scm_reverse_x performance, as scm_reverse_x is used quite a bit in libguile/expand.c. Since the performance impact of reverse! in this example is indistinguishable from thermal noise, its use seems to be outside of the quadratically behaving code parts. -- David Kastrup