This is the mail archive of the
mailing list for the Cygwin project.
Re: Perl inefficiency...
$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(?). Shouldn't it be using closer to 100MB to store
Of course if perl had a "use-less-memory" pragma, I might even
"hope" that it would store the above string as a repeat-count
followed by the string...but that would be expecting a bit...
I understand perl may not be as efficient in data storage as
C, but seems like expanding a 100MB string to take 200MB is
Is this what you were referring to, Corinna?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html