Re: g_hash_table_resize (#59026)
- From: Owen Taylor <otaylor redhat com>
- To: Daniel Egger <egger suse de>
- Cc: gtk-devel-list gnome org
- Subject: Re: g_hash_table_resize (#59026)
- Date: 22 Aug 2001 20:01:43 -0400
Daniel Egger <egger suse de> writes:
> Am 19 Aug 2001 14:00:13 -0400 schrieb Owen Taylor:
>
> > But gcc-2.96, which generally has considerably better optimization
> > misses the fact that the two branches of the if are exclusive.
>
> > And its dependent on processor ... when I tried timing multiple
> > versions there was very little consistency in ordering between
> > a PIII and a celeron. (With total variation being small --
> > a few percent even in my artificial micro-benchmark)
>
> Which benchmark is this? I can contribute some data for PPC and various
> compilers as well as sparc64, sparc32, Alpha, Pentium IV, Athlon,
> Itanium and various others if wanted. :) But I'm interested on seeing
> how this performs in comparison on PPC with gcc 3.0.1.
It's the one that I posted in my first mail:
====
GHashTable *ht = g_hash_table_new (g_direct_hash, NULL);
int i, j;
for (i=0; i < 1000; i++)
{
for (j = 0; j < 1000; j++)
g_hash_table_insert (ht, GUINT_TO_POINTER(j), GUINT_TO_POINTER(j));
for (j = 0; j < 1000; j++)
g_hash_table_remove (ht, GUINT_TO_POINTER(j));
}
=====
(Actually, with 10000 iterations instead 1000 to get timeable data.)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]