On 2/12/07, <b class="gmail_sendername">Thomas Hruska</b> <<a href="mailto:thruska@cubiclesoft.com">thruska@cubiclesoft.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
... Finding<br>an entry requires scanning the linked list linearly, resulting in O(N^2)<br>load times (i.e. the bigger the config, the longer it takes to load).<br>Consider using a hash instead.<br></blockquote></div><br>
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.
<br><br>--bong<br>