octave-maintainers
[Top][All Lists]
Advanced

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

Re: FYI: smarter indexing by logical masks


From: Judd Storrs
Subject: Re: FYI: smarter indexing by logical masks
Date: Sat, 28 Nov 2009 14:55:51 -0500

On Sat, Nov 28, 2009 at 1:23 AM, Jaroslav Hajek <address@hidden> wrote:
> Not really. Let me explain how this works (not in 3.2.x though). When a
> matrix is first used in index expression, the internal conversion to
> index_vector is, if successful, cached for subsequent uses.

That is even better. I didn't pick up on octave caching the result in
your first email. Now I don't even have to do that manually anymore
which is also a huge deal! :) When you were reporting the two times in
your benchmark, I misunderstood and thought that was about filling the
CPU cache/conditioning along the lines of timeit.m
http://blogs.mathworks.com/steve/2008/02/29/timing-code-in-matlab/

find() returning doubles is yet another case of WWMWT that I hadn't
noticed. In a sane world index vectors would map immediately to one of
the integer array types based on the architecture. At least that's how
it works in IDL. But you're right, Matlab returns doubles. WITWWMWT D:

Great work!


--judd


reply via email to

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