Re: I need the fastest routine
- From: "Dan Bartlett" <danbartlett@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 7 Jul 2008 23:10:35 +0100
"W. van Wezel" <huis@xxxxxxxxxxxxxx> wrote in message
news:48728a15$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Oeps,
You're right. Also:
for I:=1 to numThreads-1 do if msgs[I].tMax<iMax then iMax:=msgs[I].tMax;
should be
for I:=1 to numThreads-1 do if msgs[I].tMax>iMax then iMax:=msgs[I].tMax;
ah yeah, spotted that one too, but forgot about it :P
although a simpler function for finding min & max works better on my PC
(single core):
Yes, because you can't compensate for the overhead of threading. What
happens if you set numThreads to 1?
Wout
I had to test them outside IDE, because it was having a large effect on the
result when a lot of threads were being used.
Original code: 0.774 seconds
Simple method: 0.372 seconds
1 Threads - 0.381 (0.390 inside IDE)
2 Threads - 0.382 (0.417 inside IDE)
3 Threads - 0.383
4 Threads - 0.385 (0.438 inside IDE)
8 threads - 0.385
16 threads - 0.387
128 threads - 0.44 (2.828 inside IDE)
256 threads - 0.503
1024 thread - 0.850
Dan.
.
- Follow-Ups:
- Re: I need the fastest routine
- From: Hubert Seidel
- Re: I need the fastest routine
- From: W. van Wezel
- Re: I need the fastest routine
- References:
- I need the fastest routine
- From: Clément Doss
- Re: I need the fastest routine
- From: W. van Wezel
- Re: I need the fastest routine
- From: Dan Bartlett
- Re: I need the fastest routine
- From: Dan Bartlett
- Re: I need the fastest routine
- From: W. van Wezel
- I need the fastest routine
- Prev by Date: Re: I need the fastest routine
- Next by Date: Re: I need the fastest routine
- Previous by thread: Re: I need the fastest routine
- Next by thread: Re: I need the fastest routine
- Index(es):
Relevant Pages
|