How to write a faster seqrcomplement function

Hi,
I noticed that whenever I use the function seqrcomplement, the line that calls this function takes about 80-90% of the total running time.
If I use
SRC = int2nt(5 - nt2int(fliplr(S)));
instead of
SRC = seqrcomplement(S);
then this reduces the time to half, but it is still slow if I need to process millions of sequences. Is there a much faster alternative to seqrcomplement ?
Thanks!

回答 (1 件)

Roberto
Roberto 2014 年 5 月 8 日

0 投票

I really don't know if there's a faster alternative, but if you have millions of sequences try parallel computing...
% parallel computing
matlabpool(8) % number of workers! Setup first
parfor i = 1 : 1000000
% your code here!
end
matlabpool close ; % end workers
there are a few considerations that you might take, I'm not an expert but you can try this...

カテゴリ

ヘルプ センター および File ExchangeBig Data Processing についてさらに検索

質問済み:

2014 年 5 月 8 日

回答済み:

2014 年 5 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by