Those are beautiful. First, make sure in Choose Language / Show Details that it's set to "No debugging or profiling", and that "Preserve stacktrace" not set.
The 2htdp/image library has immutable images, so the image you're creating contains all the line drawing "unexecuted" until you display or freeze it. There's a lot of symmetry, so rather than passing an image as a parameter can you express the algorithm as returning one of the component images at each level, then rotating and combining it with itself? As long as the result is symmetric that will create a rather narrow Direct Acyclic Graph of images. You can then also experiment with freezing some of those intermediate images, especially at the top levels where rotating a bitmap might be faster than executing the drawing actions in a rotated co-ordinate system. But that's speculation, not experience. Other than that, consider drawing directly into a mutable bitmap% from racket/draw, or explore images/flomap. Then there are the possibilities of Typed Racket optimizations, and profiling and the Optimization Coach in general. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.