bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Simple multi-threading... Update


From: Jonathan Kinsey
Subject: Re: [Bug-gnubg] Simple multi-threading... Update
Date: Tue, 16 Jan 2007 19:12:55 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0

I've had some free time again, so have fixed the couple of issues and
now have it producing the same results multithreaded as singlethreaded,
I hope I haven't broken anything along the way.  There is probably still
an issue if REDUCTION_CODE is defined (as it uses a global variable),
but I'm not using that here.  Here's a review by system type:

Windows-MS compiler-SSE enabled
-------------------------------
This works fine, here's some test numbers (in seconds) analysing a match
at world class:

Dual-core desktop
        One thread: 235
        Two threads: 125

I got similar results on a dual-core laptop (just under 90% faster).  I
also ran it without USE_MULTITHREAD defined and without MULTITHREAD
defined and got the same (235) result, which suggests there's little
overhead to using the multithreaded code.

Dual processor quad-core
        One thread: 120
        Eight threads: 20

Windows-gcc compiler-SSE disabled
---------------------------------

This worked fine.  There is still an issue here with mis-aligned stacks
in the threads stopping the SSE code from working.  The bug on the gcc
forum seems to suggest it's a threading issue, but I'm not so sure as
the code is identical for both compilers, I'll take a closer look...

Linux
-----

I've added some TLS (thread local store) code, so have included some
pthreads calls (as there didn't appear to be a glib alternative) - maybe
I should convert the glib multithreaded code to pthreads as well?


Jon

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]