octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: bsxfun optimized


From: Søren Hauberg
Subject: Re: FYI: bsxfun optimized
Date: Tue, 20 Oct 2009 11:57:56 +0200

tir, 20 10 2009 kl. 11:13 +0200, skrev Jaroslav Hajek:
> One further question that remains is whether to retain the old code,
> or replace it with the spread-and-apply approach above.
> The old code is more memory-efficient (it creates the result array and
> then updates it), but apparently slower, sometimes significantly.
> Opinions?

Cool! I love these X-has-been-optimised mails :-)

Would it be possible to test if the system has enough memory to use the
spread-and-apply approach before hand? If so, then you could do
spread-and-apply when the memory is available and fall back to the
memory-efficient approach otherwise. the down-side is of course that
this gives more code to maintain.

Soren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]