develooper Front page | perl.perl5.porters | Postings from February 2004

Re: [PATCH] optimization for map in scalar context

Thread Previous | Thread Next
From:
perl5-porters
Date:
February 24, 2004 18:41
Subject:
Re: [PATCH] optimization for map in scalar context
Message ID:
c1h1tl$a91$1@post.home.lunix
In article <20040224110257.GA5510@ethan>,
	Tassilo von Parseval <tassilo.parseval@post.rwth-aachen.de> writes:
> --Boundary_(ID_/KQJHzTvm5ljVmrYjJOJNQ)
> Content-type: text/plain; charset=us-ascii
> Content-transfer-encoding: 7BIT
> Content-disposition: inline
> 
> Hi,
> 
> the question whether map() has the same optimization for scalar context
> as it has for void context was raised on clpm. It turned out that it
> hasn't and the attached tiny and rather cheap patch puts things right.
> 
So next the same question arises about grep in scalar context...
(void context too maybe, but I doubt anyone does that)
Does it build a result list and then throw it away ?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About