On 21 August 2010 12:52, Wolfram Humann <w.c.humann@arcor.de> wrote: > For a patched win32 perl I'll have to wait till Monday. What I can compare > now is Strawberry (usemymalloc=n) to Cygwin (usemymalloc=y). This slightly > golfed version heh. :-) > perl -MData::Dumper -E"sub mt{my $d=shift;$d>0?[mt($d-1),mt($d-1)]:int rand > 100}; say length Dumper mt 18" > 34576966 > > needs approx. 6 seconds to print and 8 seconds to finish on both of these. Interesting, how does that compare for you if you stick a $Data::Dumper::Useqq=1; before the dump? > No noticeable difference. With a touch of horror I have to report that the > printed stringlengths are slightly non-deterministic from run to run...??? :-) No worries there, the code does use rand() after all, so we expect to see slightly different results from run to run (or the srand initialization would be broken). Add a srand(1) or change the int rand 100 to a constant and it should produce repeatable results. Anyway, thanks, i recall code like this taking unacceptably long (iow, killed before it stopped) on Win2k with the XS version, and it taking just-barely-acceptably long with the PP version (enabled by the Useqq option as the XS code doesnt know how to do double-quoting.) Cheers, yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next