It's always nice to have numbers when planning optimizations. So I started fiddling with oofib.imc.
It seemed like we were spending a lot of time copying strings. So I defined the method name strings once, in main, $S3 = "fibB" and replaced calls like self.fibB(n2) with self.$S3(n2) Optimized and unoptimized reported run times went down 10%. That's 1/5 of the way to perl! :) I would like to see at least two other tests: (1) doing fetch_method in main, and using the fetched methods, rather than repeatedly looking them up. (2) creating an explicit return continuation in fib, and using it for both recursive calls, cutting continuation creation in half. The first will illustrate the maximum savings we can expect here from a perfect, costless, method lookup cache. The second will illustrate how much time is being spent in return continuation pmc creation and associated garbage collection. What else might be interesting? I began work on (1), but got bogged down. Perhaps a better imc writer than I could knock it off? I just don't have that warm fuzzy feeling that we know where our time is going yet. Mitchell