Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #4063
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Date | Sun, 29 Dec 2013 17:29:27 +0100 |
| From | Luuk <luuk@invalid.lan> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
| MIME-Version | 1.0 |
| Newsgroups | comp.programming |
| Subject | Re: Perl or PHP? |
| References | <l9mruq$pn8$1@speranza.aioe.org> <db93pa-d0p.ln1@luuk.invalid.lan> <l9mt81$sqg$1@speranza.aioe.org> <98a3pa-0sq.ln1@luuk.invalid.lan> <v2Ivu.1028$v04.766@fx28.am4> |
| In-Reply-To | <v2Ivu.1028$v04.766@fx28.am4> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <78v5pa-34i.ln1@luuk.invalid.lan> (permalink) |
| Lines | 56 |
| NNTP-Posting-Host | 2001:980:9089:1:fca7:d565:ab76:dd63 |
| X-Trace | 1388334601 news.xs4all.nl 2862 [2001:980:9089:1:fca7:d565:ab76:dd63]:59822 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.programming:4063 |
Show key headers only | View raw
On 28-12-2013 23:13, BartC wrote:
> "Luuk" <luuk@invalid.lan> wrote in message
> news:98a3pa-0sq.ln1@luuk.invalid.lan...
>> On 28-12-2013 17:11, Victor Porton wrote:
>
>>> Could you disclose the content of files test.pl and test.php?
>>>
>>>> But the question of course is, what are your comparing?
>>>>
>>>> ;-)
>>>
>>
>> 1 #!/usr/bin/perl
>> 2
>> 3 for ($count = 1000; $count >= 1; $count--) {
>> 4 print "$count ";
>> 5 }
>>
>>
>> and
>>
>> 1 #!/usr/bin/php
>> 2
>> 3 <?php
>> 4 for ($f=1000; $f>=1; $f--)
>> 5 echo "$f ";
>
> So you're mainly testing I/O rather than the language: which depends on the
> commands that are used for output in the language, how they are
> implemented,
> how the console is driven, the console implementation code, the kind of
> display, etc.
>
> Changing your tests a little so that the loops increment a variable, and
> putting the output at the end, makes PHP twice as fast as Perl (on the same
> setup which had PHP seven times slower than Perl using your tests.) Eg:
>
> $a=0;
> for ($count = 10000000; $count >= 1; $count--) {
> $a=$a+1;
> etc.
>
> Still a lousy benchmark, but at least it avoids I/O which is highly
> misleading.
>
>
thats why i said:
what are your comparing?
;-)
The starting point of this thread was wrong.
OP should have investigated the strong, an weak points of both choices,
in stead of yust focussing on 'performance'
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Perl or PHP? Victor Porton <porton@narod.ru> - 2013-12-28 17:49 +0200
Re: Perl or PHP? Victor Porton <porton@narod.ru> - 2013-12-28 17:51 +0200
Re: Perl or PHP? Luuk <luuk@invalid.lan> - 2013-12-28 17:03 +0100
Re: Perl or PHP? Victor Porton <porton@narod.ru> - 2013-12-28 18:11 +0200
Re: Perl or PHP? Luuk <luuk@invalid.lan> - 2013-12-28 17:18 +0100
Re: Perl or PHP? "BartC" <bc@freeuk.com> - 2013-12-28 22:13 +0000
Re: Perl or PHP? Luuk <luuk@invalid.lan> - 2013-12-29 17:29 +0100
Re: Perl or PHP? Victor Porton <porton@narod.ru> - 2013-12-28 20:40 +0200
Re: Perl or PHP? Öö Tiib <ootiib@hot.ee> - 2013-12-28 12:26 -0800
csiph-web