From: Dmitri A. S. <das...@gm...> - 2006-02-20 20:18:32
|
On 2/18/06, William Poetra Yoga Hadisoeseno <wil...@gm...> wrote= : ... > Implementation 4: (This is Alois' new implementation based on > Implementation 3) If text is a string, pattern is searched. If it is a > cellstr, strfind is recursively called for every string in it. This is > slow when text is a cellstr, because of the recursion. > > The implementations are attached as text attachments. I personally > prefer implementation 1, but for inclusion to octave I think John > should choose one. > FWIW: In my experience I need to use strfind usually on text that is a string. Normally this is a part of parsing of some external data file with a not well-defined structure. The text is a cellstr usually when there is a known or well-defined structure and one can use this knowledge to optimise the search. So my vote would go for the Implementation 4 -- I would like to have the best performance for the most common case rather than the best performance in the most general case. > -- > William Poetra Yoga Hadisoeseno > Sincerely, Dmitri. -- |