Re: [code-review] Benchmarking concatenation vs. interpolation
Adam Turoff <[email protected]> Thu, 4 Dec 2003 18:01:32 -0500
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Dec 04, 2003 at 11:43:17PM +0100, Abigail wrote: > Not by a long shot. First of all, the final strings will differ, the > string assigned in the 'interp' case has far more spaces that the > 'concat' case. But what's worse, the 'concat' case has 4 assignments, > while the 'interp' case has only one. Thanks. I knew there was something fishy. I was comparing the before/after code (which had the extra assignments, and differences in output) not the performance differences between concat/interpolate. The upshot is that the practice of successive .= operations to avoid "costly interpolation overhead" is a *lot* worse than I suspected. :-) Thanks, Z.