> 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