aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[aspell-devel] Re: optimizations


From: Kevin Atkinson
Subject: [aspell-devel] Re: optimizations
Date: Mon, 26 Apr 2004 20:00:21 -0400 (EDT)

On 26 Apr 2004, Karl Chen wrote:

> >>>>> "Kevin" == Kevin Atkinson <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]