
h.m.brand at xs4all
Oct 8, 2009, 10:05 AM
Post #13 of 30
(957 views)
Permalink
|
|
Re: [perl #60374] Safe.pm sort {} bug with -Dusethreads
[In reply to]
|
|
On Thu, 8 Oct 2009 09:41:42 -0700, "David E. Wheeler" <david [at] kineticode> wrote: > On Oct 7, 2009, at 11:25 PM, Rafael Garcia-Suarez wrote: > > >> Just to be sure: That advice is in the context of using Safe.pm, > >> right? Or are there problems with sort() ourside safe compartments > >> under threading as well? Are there any open bugs about them? > > > > No, sort is thread-unsafe as long as the sort function is custom (and > > not XS, IIRC). That's basically because it's called in a super-fast > > way, for speed. I think there are bugs, but can't find one rapidly. > > It seems to me that such bugs should be fixed as they're identified. > Even if sorting becomes slower with threads, I'll take correct over > fast any day. Then use an unthreaded perl, and you've got correct behaviour :) As long as it doesn't slow down unthreaded builds, I'm fine with any solution. I have never ever needed a threaded build for anything, and speed is the major reason to build unthreaded perl from the beginning. IIRC the worst case difference was up to 40% loss (gcc + threads vs native cc no-threads), where threads was the biggest problem. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
|