Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   speeding up elog : gcc compile optimizations, posted by Fred Hooper on Tue Jul 27 18:33:52 2004 
    icon4.gif   Re: speeding up elog : gcc compile optimizations, posted by Stefan Ritt on Wed Jul 28 15:03:17 2004 
       icon4.gif   Re: speeding up elog : gcc compile optimizations, posted by Fred Hooper on Sat Jul 31 16:55:21 2004 
          icon4.gif   Re: speeding up elog : gcc compile optimizations, posted by Stefan Ritt on Mon Aug 2 09:05:48 2004 
             icon8.gif   Re: speeding up elog : gcc compile optimizations, posted by Drew on Tue Aug 3 16:59:36 2004 
Message ID: 640     Entry time: Sat Jul 31 16:55:21 2004     In reply to: 622     Reply to this: 641
Icon: Warning  Author: Fred Hooper  Author Email: fhooper@sushisoft.com 
Category: Bug fix  OS: Linux  ELOG Version: 2.5.3 
Subject: Re: speeding up elog : gcc compile optimizations 
> > I noticed that the gcc compiler options in the tarball Makefile were not
> > conducive to speed.  There, I tried changing the gcc options to:
> > 
> > CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -W -Wall
> 
> Thank your for this hint, I changed my Makefile for the production code. However, I
> could not feel any difference between the two options. The real problem is the
> function getcfg(), which gets called many thousand times internally and has to parse
> elogd.cfg each time. Once I implement a hash table for that function, elogd should
> become faster by at least a factor of two.

Yeah - What's up with that?

I have seen this discussed before - Seems like it should be a priority to get this
fixed, as doing a hash table is straightforward, and the speed increase should be pretty
health - there are several c libraries available - check out "man 3 hsearch" for the
POSIX hash table management that already available.  Other c library searches that you
could use include bsearch (binary tree), tsearch (tree searching), btree (b+ tree). 
However, the easiest and most obvious one to use for elog appears to be a simple hash
table search (hsearch).

Is there something else  which is making this difficult to do?
ELOG V3.1.5-fe60aaf