Perl inefficiency...

Yitzchak Scott-Thoennes sthoenna@efn.org
Wed Jan 24 21:52:00 GMT 2007


Linda Walsh <cygwin <at> 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
places.  It is definitely not using 2 bytes per ascii character in a
single string.

Try Corinna's script under "strace -m malloc -o trace.out perl ..."
with a "tail -F trace.out" running in a separate window.

-- 
I'm looking for a job: http://perlmonks.org/?node=ysth#looking



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list