On Thu, 24 Aug 2000 09:38:28 +0100, Hildo Biersma wrote: >> I expect that we'll get more compile-time benefit from >> >> my HASH sub foo { >> ... >> } >> >> %bar = foo(); > >Ah, the Return Value Optimization so loved in C++... > >For those who haven't seen it before, you can optimize this by passing >in a reference to %bar to foo() and then use that in the function. Just a remark: this is only safe if all other references to the hash returned are abandoned. Otherwise you'd have an alias where you should have gotten a copy. -- Bart.
- Re: RFC 127 (v1) Sane resolution to... Chaim Frenkel
- Re: RFC 127 (v1) Sane resolutio... Larry Wall
- Re: RFC 127 (v1) Sane resolutio... Chaim Frenkel
- Re: RFC 127 (v1) Sane resolutio... Dan Sugalski
- Re: RFC 127 (v1) Sane resolutio... Nick Ing-Simmons
- Re: RFC 127 (v1) Sane resolutio... Chaim Frenkel
- Re: RFC 127 (v1) Sane resolutio... Glenn Linderman
- Re: RFC 127 (v1) Sane resolutio... Chaim Frenkel
- Re: RFC 127 (v1) Sane resolutio... Glenn Linderman
- Re: RFC 127 (v1) Sane resolution to large fu... Hildo Biersma
- Re: RFC 127 (v1) Sane resolution to larg... Bart Lateur
- Re: RFC 127 (v1) Sane resolution to... Larry Wall
- Re: RFC 127 (v1) Sane resolutio... Dan Sugalski
- Re: RFC 127 (v1) Sane resolutio... Larry Wall
- Re: RFC 127 (v1) Sane resolutio... Chaim Frenkel
- Re: RFC 127 (v1) Sane resolution to large function return... GregLondon