Re: XMas printing benchmark

2001-01-12 Thread Stas Bekman
On Wed, 27 Dec 2000, Gunther Birznieks wrote: I don't completely understand the purpose of this benchmark. Are you testing string operations or print operations? Currently it seems as if the two are being tested together which doesn't necessarily provide the most meaning in the result.

Re: XMas printing benchmark

2000-12-29 Thread Alexander Farber (EED)
Perrin Harkins wrote: I know it's not the point, but I'd consider it poor style if I saw someone using anything other than a HERE doc for the job you're testing. Why? With HERE you can't indent your code: my @text = ( "!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"\n", "HTML\n",

Re: XMas printing benchmark

2000-12-29 Thread Ron Beck
Since when??? I've always done... print"end_o_doc"; form action="../scripts/pgr_req03.cgi" method="post" table border="0" cellpadding="0" cellspacing="0" width="100%" tr td colspan="4" div align="left" font face="Arial" size="4" color="#80" strongIndividual Requesting the

Re: XMas printing benchmark

2000-12-29 Thread Alexander Farber (EED)
Ron Beck wrote: Since when??? I've always done... print"end_o_doc"; form action="../scripts/pgr_req03.cgi" method="post" ... Problems with this??? Ron I mean indenting code, not data. "Alexander Farber (EED)" wrote: Why? With HERE you can't indent your code: my @text = (

Re: XMas printing benchmark

2000-12-29 Thread darren chamberlain
How about this: ### Code: (my $text ='foo') =~ s/^\s+://mg; :h1Hello, World!/h1 : pa href="http://foo.org/"I/a am an indented link./p : pSo am a href="http://bar.org/"I/a./p foo print $text; ### Output: h1Hello, World!/h1 pa

[OT] Here document indenting (Was: XMas printing benchmark)

2000-12-29 Thread Andrew Ho
Hello, DC(my $text ='foo') =~ s/^\s+://mg; DC:h1Hello, World!/h1 DC: pa href="http://foo.org/"I/a am an indented link./p DC: pSo am a href="http://bar.org/"I/a./p DCfoo DCprint $text; This, and other methods (without the beginning colon, for

Re: XMas printing benchmark

2000-12-29 Thread Perrin Harkins
On Fri, 29 Dec 2000, Alexander Farber (EED) wrote: Why? With HERE you can't indent your code: Left-aligning the final line never really bothered me, since it doesn't bother emacs. To each their own I guess. I find the HERE doc to be one of the nicest Perl idioms. - Perrin

XMas printing benchmark

2000-12-26 Thread Stas Bekman
Something like half a year ago I've posted a benchmark of different printing techniques. Only now I've absorbed all the comments and here is a new benchmark based on these comments. use Benchmark; use Symbol; my $fh = gensym; open $fh, "/dev/null" or die; my @text = (

Re: XMas printing benchmark

2000-12-26 Thread Ask Bjoern Hansen
On Tue, 26 Dec 2000, Stas Bekman wrote: Your comments are welcome. your benchmark shows that it is really hard to screw up so much that it actually matters and that there *always* will be somewhere else in the application where there's more performance to be won. :-) - ask -- ask bjoern

Re: XMas printing benchmark

2000-12-26 Thread Gunther Birznieks
I don't completely understand the purpose of this benchmark. Are you testing string operations or print operations? Currently it seems as if the two are being tested together which doesn't necessarily provide the most meaning in the result. For example, is it the string concatenation that is