delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/24/16:52:44

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
Subject: Re: Perl inefficiency...
Date: Wed, 24 Jan 2007 21:51:57 +0000 (UTC)
Lines: 17
Message-ID: <loom.20070124T223909-292@post.gmane.org>
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
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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019