X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Yitzchak Scott-Thoennes Subject: Re: Perl inefficiency... Date: Wed, 24 Jan 2007 21:51:57 +0000 (UTC) Lines: 17 Message-ID: References: <20070122181727 DOT GC27843 AT calimero DOT vinschen DOT de> <1552 DOT 67 DOT 40 DOT 28 DOT 188 DOT 1169493973 DOT squirrel AT 67 DOT 40 DOT 28 DOT 188> <20070122202137 DOT GC20665 AT calimero DOT vinschen DOT de> <3593 DOT 67 DOT 40 DOT 28 DOT 188 DOT 1169584799 DOT squirrel AT 67 DOT 40 DOT 28 DOT 188> <20070124100540 DOT GP27843 AT calimero DOT vinschen DOT de> <45B7CADC DOT 4050502 AT tlinx DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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/