On 26 Apr 2004, Karl Chen wrote:

> >>>>> "Kevin" == Kevin Atkinson <[EMAIL PROTECTED]> writes:
>     >> Gcc 3.3 requires constants (empty_str) to be initialized.
>     >> (BTW, you could probably make it static const or just write
>     >> the value instead of empty_str)
>     Kevin> 
>     Kevin> Its a minor memory optimization.  The idea is to avoid
>     Kevin> having to dereference a distant memory location just to
>     Kevin> discover that it is the empty string.
> 
> Are you sure this is really worth it?  (I'm asking, not being rude.)
> 
> It seems like a very premature optimization (trying to make sure
> that the string contents are in L1 cache).  For example, if you
> wanted to trade simplicity for acute optimizations you could use
> NULL instead of "" to indicate empty strings to avoid the
> memory-load altogether when reading the value.

Its a minor optimization that is easy to do.  It doesn't do any harm.  
Therefor it is worth it.  There is no point in removing it, is there?

-- 
http://kevin.atkinson.dhs.org



_______________________________________________
Aspell-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/aspell-devel

Reply via email to