comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: puzzled re hyperthreaded performance
Date: Thu, 15 Sep 2005 16:43:08 -0500
Date: 2005-09-15T16:43:08-05:00	[thread overview]
Message-ID: <lv-dnaLRCJFxd7TeRVn-sA@comcast.com> (raw)
In-Reply-To: UvOdnZ2loeKNQLTeRVn-1g@comcast.com

Further data:

>     Cache thrashing certainly comes to mind as a possible problem with
> multi-threading.  But the program at hand is small.  I cut the problem
> size so there are at most two simultaneous hash tables of Length 4091 for
> 6 character Strings, which, assuming 20 bytes/entry would be 2*4000*20 or
> 160K, plus 50K input String = 210K which I would think would fit well
> inside the cache without thrashing.  But it's still slower (about 10%) to
> run multithreaded than sequential.
   Since this used exclusively 6 character Strings, I changed from
Ada.Containers.Indefinite_Hashed_Maps to
Ada.Containers.Hashed_Maps
Now the parallel version runs 30% faster than the sequential one.
Increasing the string (and thus hash table) size to more probably
thrash the cache brings it back to parallel being slower than sequential.
So part of the problem is cache thrashing, but there's still some
remaining problem when using Indefinite_Hashed_Maps.



  reply	other threads:[~2005-09-15 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15  5:10 puzzled re hyperthreaded performance tmoran
2005-09-15  6:08 ` jtg
2005-09-15 12:13   ` keld_nielsen_4nulspam
2005-09-15 20:44     ` tmoran
2005-09-15 21:43       ` tmoran [this message]
2005-09-19 20:21 ` Wiljan Derks
2005-09-20  0:26   ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox