|
From: Gilles D. <gr...@sc...> - 2002-06-18 14:49:42
|
According to Geoff Hutchison:
> It seems like we could save some time here and just return if the word
> is short and do this even sooner in the method, e.g.
> if (trackWords)
> {
> if (strlen(word) < minimumWordLength)
> return;
> String w = word;
> ...
>
> This saves updating the wordRef, the word component code, etc. Anything
> obviously wrong with this?
For the sake of tidiness, I'd write it as:
if (trackWords && strlen(word) >= minimumWordLength)
{
String w = word;
...
but yes, this seems quite reasonable to me. I simply missed that
opportunity for optimisation when I added the compound word handling code.
--
Gilles R. Detillieux E-mail: <gr...@sc...>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
|