comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: puzzled re hyperthreaded performance
Date: Mon, 19 Sep 2005 19:26:45 -0500
Date: 2005-09-19T19:26:45-05:00	[thread overview]
Message-ID: <-amdnSVxPY7YyrLeRVn-jA@comcast.com> (raw)
In-Reply-To: 5bd67$432f1da8$3ea6010b$8314@news.versatel.net

> I think the hypertreading is more like multiplexing the cpu over different
> threads without the
> cost of taskswitching but t does not give you additional CPU performance.
> This effect can make measurements very confusing.
>
> I whould like to know if anyone has a different experience.
  Running a sort on 100K floats (so about 400K bytes) I find a substantial
speedup (about 30%) if it's split into two simultaneous tasks, the main
program and an Ada task.
  Using Ada.Containers.Hashed_Maps to find all the n-character strings in
a given 50K string of just 4 letters (simulated DNA) with the main
program doing it for n=12 and the extra Ada task for n=18, there is no
improvement, and in fact a loss.  But the same program run with n=6 and
n=8 does show significant speedup.  In the former case, there are roughly
50K strings of the indicated sizes, so the hash table presumably has about
50000*18 bytes of key data or roughly 1MB, so the second task, which needs
another 1MB hash table, is probably fighting over the processor's total 1MB
cache space, while in the latter case there is probably room for both in
cache.  If I switch to Ada.Containers.Indefinite_Hashed_Maps, then even
the small one shows no multitasking speedup.  I haven't analyzed
Indefinite_Hashed_Maps to see why that might be the case.
  Running a word counting program, there was a substantial speedup by
processing alternate buffer loads via the environment task and a second
task.  In that case there was probably no cache contention, and one
task was probably processing its bufferload while the other was doing
IO (which probably did not come off disk except on the first run of
the program).
  The above is on a hyperthreaded Pentium under Windows 2000. YMMV



      reply	other threads:[~2005-09-20  0:26 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
2005-09-19 20:21 ` Wiljan Derks
2005-09-20  0:26   ` tmoran [this message]
replies disabled

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