Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <hhudae$4p$1@fred.mathworks.com> <hhuths$led$1@fred.mathworks.com> <hi023t$mtq$1@fred.mathworks.com> <hi1f7i$plv$1@fred.mathworks.com> <hi1g5n$f7i$1@fred.mathworks.com> <hi1ua1$d7e$1@fred.mathworks.com> <hi2300$6dk$1@fred.mathworks.com> <hi25nk$5lo$1@fred.mathworks.com> <hi2maq$8ba$1@fred.mathworks.com> <hi2u1m$pg5$1@fred.mathworks.com> <hi9qbn$qmn$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1263038164 19622 172.30.248.38 (9 Jan 2010 11:56:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 9 Jan 2010 11:56:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:597657

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

> 
> 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.

Bruno