octave-maintainers
[Top][All Lists]
Advanced

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

Re: Thread-safety issues in QtHandles


From: Søren Hauberg
Subject: Re: Thread-safety issues in QtHandles
Date: Tue, 15 Nov 2011 10:53:09 +0100

man, 14 11 2011 kl. 19:48 +0000, skrev Michael Goffioul:
> On Wed, Nov 9, 2011 at 1:13 PM, Michael Goffioul
> <address@hidden> wrote:
> > Here's a complete patch for octave, implementing this new approach.
> > It's obviously less intrusive than the previous one; I made it
> > configurable and disabled it by default. I tested it on Linux and
> > although it's probably not as bullet-proof as using shared_ptr, it
> > seems to provide a level of safety that is satisfying for QtHandles: I
> > tried to launch mirone a couple of times and didn't get any crash. I
> > also timed it on Linux (compiled with "-g -O2"): without the patch,
> > the test suite runs in 94.53s, with the patch, it runs in 111.93s
> > (that is ~17% increase).
> 
> Any update on this one?
> 
> Did anybody give it a try, for instance on amd64 or Mac OS X?

I just tried this on 32-bit Linux, and it works even though I see a
noticeable slow-down. I tried running

  clear; tic, N = 1000; for a = 1:N, for b = 1:N, A (a, b) = a; endfor,
endfor; toc

in Octave with thread-safety enabled and got a run-time of 12.3 seconds
and without it drops to 8.8 seconds.

I am very much in favour of making the Octave core thread-safe as it
would be a first step in making parallel computations possible from
within Octave. Yet it seems like the observed slow-down is too large at
the moment. Do you have a feeling if the current implementation is as
fast as it can get or if there are tricks to speed things up?

Cheers
Søren 



reply via email to

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