[GLLUG] Software Library Release

Clay Dowling clay at lazarusid.com
Tue Feb 13 08:23:33 EST 2007


Blast, I seem to be not getting all messages.  Tom, could you forward
those points to me privately?  On this particular point I'm inclined to
disagree with your reasoning and consider other structures as premature
optimization, principally because it would complicate the code and give me
negligible performance gains.

Whoever the list administrator is, the list program seems to be
selectively dropping messages, because I received non of Tom's comments.

Clay

Thomas Hruska wrote:
> Bong Munoz wrote:
>> On 2/12/07, Thomas Hruska <thruska at cubiclesoft.com> wrote:
>>>
>>> ... Finding
>>> an entry requires scanning the linked list linearly, resulting in
>>> O(N^2)
>>> load times (i.e. the bigger the config, the longer it takes to load).
>>> Consider using a hash instead.
>>>
>>
>> A configuration file where a linear search in C becomes significant
>> should
>> be massive. If grep can go through a 7Mb file in mere seconds an O(N)
>> linear
>> scan should be efficient enough. Besides, configuration data is usually
>> only
>> loaded once.
>>
>> --bong
>
> grep and this library are unrelated in what they do.  I'll grant you
> that it would probably be a massive config where performance becomes an
> issue, but if you have to equate the library to grep, it would be
> similar to running grep for each entry in the config (minus the time it
> took to start up grep's executable for each search).  A program that
> loads a configuration is going to want each and every value from that
> configuration with defaults as a fallback position if an entry is
> missing or invalid.  So the entire config would be searched for each
> entry until it was found...starting at the beginning.  A way to
> potentially speed up configuration loading while retaining the linked
> list would be to delete each entry after it is found.  This becomes
> close to O(1) if the config is sorted the way the program expects the
> options to appear in.  Anyway, that was my last point in a list of
> design issues and really didn't think it was all that important.
>
> --
> Thomas Hruska
> CubicleSoft President
> Ph: 517-803-4197
>
> *NEW* VerifyMyPC 2.0
> Change tracking and management tool.
> Reduce tech. support times from 2 hours to 5 minutes.
>
> Free for personal use, $10 otherwise.
> http://www.CubicleSoft.com/VerifyMyPC/
>
> _______________________________________________
> linux-user mailing list
> linux-user at egr.msu.edu
> http://mailman.egr.msu.edu/mailman/listinfo/linux-user
>


-- 
Simple Content Management
http://www.ceamus.com



More information about the linux-user mailing list