[htdig3-dev] Re: More gprof results


Subject: [htdig3-dev] Re: More gprof results
From: loic@ceic.com
Date: Mon Feb 28 2000 - 05:30:01 PST


> Yeah, I did see the inline statements, but I was worried mostly about
> the sheer number of calls. For 5000-odd pages, it seems silly to be
> calling something 2 billion times!

 True. Marcel did the compression and I'm not familiar with the code.
NField was called in loops where it could have been stored in a temporary
variable. Still, the loops exists and that means that the compression does
billion operations on a 5000 page pool.

> Good work though, that should help narrow the performance gap.

 Again, I'm not sure that we will gain significant performances because
of that. I've compiled and profiled with -O2 -p (no -g) and I see the
following:

Each sample counts as 0.01 seconds.
  % cumulative self self total
 time seconds seconds calls us/call us/call name
 13.33 0.02 0.02 __bam_c_put
 13.33 0.04 0.02 __bam_search
 13.33 0.06 0.02 __db_fcchk
 13.33 0.08 0.02 memp_fput
  6.67 0.09 0.01 36082 0.28 0.28 WordKey::SetWord(String const &)
  6.67 0.10 0.01 __bam_c_search
  6.67 0.11 0.01 __bam_cmp
  6.67 0.12 0.01 __db_cputchk
  6.67 0.13 0.01 __db_ret
  6.67 0.14 0.01 __db_shalloc
  6.67 0.15 0.01 Db::put(DbTxn *, Dbt *, Dbt *, unsigned int)
  0.00 0.15 0.00 636194 0.00 0.00 ExternalTransport_Response virtual table
  0.00 0.15 0.00 144332 0.00 0.00 WordKey::IsDefined(int) const
  0.00 0.15 0.00 112814 0.00 0.00 WordKey::SetDefined(int)
  0.00 0.15 0.00 102197 0.00 0.00 WordKey::Get(int) const
  0.00 0.15 0.00 102197 0.00 0.00 WordKey::Set(int, unsigned int)
  0.00 0.15 0.00 83026 0.00 0.00 WordKey::Info(void)
  0.00 0.15 0.00 41513 0.00 0.00 WordKey::Clear(void)
  0.00 0.15 0.00 36082 0.00 0.00 WordKey::GetWord(void) const

  Note that *all* methods listed from WordKey are inline. For instance

  0.00 0.15 0.00 144332 0.00 0.00 WordKey::IsDefined(int) const

  is merely a 'return setbits & constant'. I doubt very much that such
a thing eats 0.15 sec when repeated 144332 times on a PIII500. We see
profiling noise here. I should check to see if there is a way for
gprof (-p) to count inlined functions as part of the calling function,
without maintaining a specific counter for them.

  Cheers,

-- 
		Loic Dachary

24 av Secretan 75019 Paris Tel: 33 1 42 45 09 16 e-mail: loic@dachary.org URL: http://www.senga.org/

------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev-unsubscribe@htdig.org You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Mon Feb 28 2000 - 06:34:35 PST