Orton, Yves wrote:

>>Yves Orton  wrote:
>>
>>    
>>
>>>>http://svn.schwern.org/svn/CPAN/Test-Simple/trunk
>>>>or
>>>>svn://svn.schwern.org/CPAN/Test-Simple/trunk
>>>>or
>>>>http://www.pobox.com/~schwern/src/Test-Simple-0.54.tar.gz
>>>>or
>>>>a CPAN near you.
>>>>
>>>>
>>>>        
>>>>
>>>Should the t/fork.t tests should still be skipped on Win32? Win32 Perl
>>>      
>>>
>has
>  
>
>>>been able to fork since at least 5.6...
>>>
>>>      
>>>
>>But only if you build it with ithreads, which I don't generally do.  It
>>would still need to skip for unthreaded builds.
>>    
>>
>
>Ok, patch is below (im curious why you dont use the threaded build if youd
>care to explain :-)
>  
>
Your patch needs to account for PERL_IMPLICIT_SYS too like t/op/fork.t 
does, as Schwern just pointed out.

I should have mentioned that rather than just "ithreads" in my mail.  
PERL_IMPLCIT_SYS is, in fact, also the reason that I don't build with 
ActivePerl-style build options:  enabling PERL_IMPLICIT_SYS means that 
Perl's malloc cannot be used, so you get the system's malloc() instead, 
which I've found several times to be absolutely crap on Win32.

For example, running this program (20 large extensions to a string):

my $a = '';
my $start = time;
for my $i (1 .. 20) {
  print "$i\n";
  $a .= '.' x 8000000;
}
printf "OK (%d seconds)\n", time - $start;

takes 1 second on my 5.8.6 with Perl malloc() versus 7 seconds using 
ActivePerl Build 810 (5.8.4).

And this program (500,000 small extensions to a string):

my $a = '';
my $start = time;
for my $i (1 .. 500000) {
  print "$i\n" if $i % 1000 == 0;
  $a .= '.' x 20;
}
printf "OK (%d seconds)\n", time - $start;

is even worse: 1 second again on 5.8.6/perl-malloc versus 56 seconds on 
5.8.4/system-malloc!

(I know that I'm not quite comparing apples with apples here, but I have 
done so before using otherwise identically configured Perls and it *is* 
the malloc() that makes the difference.)

I do mean to investigate using ithreads without PERL_IMPLICIT_SYS 
sometime (Perl's malloc works fine in that configuration), but that 
doesn't give you the fork() emulation ;)

- Steve


------------------------------------------------
Radan Computational Ltd.

We would like to take this opportunity to wish all our customers, suppliers and 
colleagues seasons greetings.  We will not be sending corporate greetings 
cards this year.  Instead, we will be making a donation to charity.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender 
immediately.  The unauthorized use, disclosure, copying or alteration of this 
message is strictly forbidden.  Note that any views or opinions presented in 
this email are solely those of the author and do not necessarily represent 
those of Radan Computational Ltd.  The recipient(s) of this message should 
check it and any attached files for viruses: Radan Computational will accept no 
liability for any damage caused by any virus transmitted by this email.

Reply via email to