efficiency of mfix
Levent Erkok
erkok@cse.ogi.edu
Mon, 14 Oct 2002 13:06:27 -0700
On Monday 14 October 2002 09:25 am, you wrote:
> While I'm happy that the fix versions outperform the 2-pass versions for
> boxed arrays, the discrepency between 79.16 seconds for one million
> elements and 4.54 sectons on the same data is alarming. Can anyone
> suggest a way to reconcile this?
As you've remarked before, the mfix version crucially depends on
boxing: it wouldn't work with unboxed arrays since the sum is only
available after the whole array is traversed. So, the question boils
down to the efficiency of boxed vs. unboxed data access, and I don't
think there's much we can do there. Of course, I'd love to be proven
wrong on this one..
-Levent.