Hi Joel, On Tue, Nov 9, 2010 at 11:00 AM, Erik Huelsmann <ehuels@gmail.com> wrote:
Hi Joel,
Running an exception profile on Maxima running its test suite shows lots of non-local transfer of control exceptions: Return, Go and Throw: during a run of ca 10 minutes, I'm finding 5.5 million exceptions being thrown which - as MissionControl calculated for me - should mean an average of little over 12k/s. I guess that's kind of expected with our strategy for non-local transfers of control.
To put this into context we (developers at JRockit) expect ~1000 exceptions / core / sec from a "typical" Weblogic app. We define this as a bit much but not terribly excessive.
My guess is that between the horrible support for fixnums (and the really slow bignums) in Java and the order of magnitude higher exception count this will dominate your performance.
Trying to find out how much it matters, I changed ABCL's compiler according to my ideas in the mail I stated earlier today. It seems MissionControl indeed measures the number of 'athrow' opcodes executed. Reducing the number of try/catch blocks (and hence the number of rethrows) by 60% [measured during the first 3 minutes of Maxima's test suite], I was able to reduce the total Maxima test suite evaluation time by a whopping 2% :-) One of the explanations I can come up with is that our ControlTransfer exceptions don't snapshot the stack: we've disabled stack snapshotting on them because we found the impact of stack snapshots to be huge. In our case, ControlTransfer is just an exceptional situation, not an error, so, we're 99,999999999% of the time not interested in the stacktrace it comes with. I do think however that code resulting from the design that I wrote down is much cleaner in terms of number of exception blocks etc. So, I might commit it anyway. I'll still need to clean up the interpreter part of things though. Do you have some further ideas for profiling ABCL, possibly with Maxima? Bye, Erik.