From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Getting indexes of rows of matrix with more than n repetitions
Date: Sat, 9 Jan 2010 11:56:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 8
Message-ID: <hi9qsk$j56$>
References: <hhudae$4p$> <hhuths$led$> <hi023t$mtq$> <hi1f7i$plv$> <hi1g5n$f7i$> <hi1ua1$d7e$> <hi2300$6dk$> <hi25nk$5lo$> <hi2maq$8ba$> <hi2u1m$pg5$> <hi9qbn$qmn$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1263038164 19622 (9 Jan 2010 11:56:04 GMT)
NNTP-Posting-Date: Sat, 9 Jan 2010 11:56:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:597657

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hi9qbn$qmn$>...

> Bad news, I implement an in-place 1D quicksort (the unstable version) and it get beaten by Matlab SORT with two outputs calling. My Matlab is 2010A prerelease; I compile the mex with MSVC 6. My guess is inplace sorting requires accessing in cascade the double data, and it slows the thing down.

To avoid confusion, what I call "inplace sorting" is an implementation of the algorithm that works on the indexes without touching the original data.