Re: Perl inefficiency...

2007-01-24 Thread Yitzchak Scott-Thoennes
Linda Walsh tlinx.org> writes: > I understand perl may not be as efficient in data storage as > C, but seems like expanding a 100MB string to take 200MB is > wasting 100MB. > > Is this what you were referring to, Corinna? No, the inefficiency is that it stores the 100MB string in two separate p

Re: Perl inefficiency...

2007-01-24 Thread Linda Walsh
$a="a"; (uses 2 Bytes) $a="a" * 100Meg; (uses 200MB) $b="b" * 100Meg; ... I may be reading this incorrectly, but I don't think the question is why storage for the separate strings "$a", "$b" isn't freed, but why would perl use 2 bytes/character? I thought perl used UTF-8 internally(?).