Randy, thanks for your response. I am trying this. opening a handle to memory, and using syswrite,.....but *nothing* gets written. I have never done this before...this is supposed to work.
Your help with this is appreciated, thanks in advance. I am running win32 xp with perl 5.8. -Jeremy A. open($fh, '>', \$pmem::arr) || die; for(0...1125000) { my $l = length("$var"); # $var = a random unique value syswrite ($fh,"$var",$l); $count++; print $count,"\n"; } close($fh); print $pmem::arr; Quoting "Randy J. Ray" <[EMAIL PROTECTED]>: > > I need a fast concat solution. the following works, but it is extremely > slow and > > it stutters. I am not replicating values, each value that is concatonated > is > > unique- the following is example does not illustrate this. > > The .= operator is one of Perl's slowest. It generally has to allocate a > completely new SV (internal data structure for scalars), copy over the > original > string, then append the new content. And you're appending *twice*, for each > iteration. At least express <<"#" . $anewvalue>> as "#$anewvalue". > > If memory is not an issue, the following would be significantly faster: > > my $count = 0; > @pmem::arr = (); > > for(0..1125000) > { > push(@pmem::arr, "#$anewvalue"); #$anewvalue is random; > $count++; > print $count,"\n"; > } > $pmem::arr = join('', @pmem::arr); > > I have no idea what would be causing the "stuttering", however. > > Randy > -- > """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > Randy J. Ray Westminster, CO http://www.rjray.org > [EMAIL PROTECTED] > > Silicon Valley Scale Modelers: http://www.svsm.org > _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs