Is PHP still slower than Perl?

Discussion in 'Perl Misc' started by @, Oct 2, 2004.

  1. @

    @ Guest

    A benchmark in 2002 showed PHP is much slower in shell or when Apache has
    Mod_Perl.

    With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice.

    Java is for a big team in short time to develope something slow.

    ASP is a joke.

    PHP is a kid.

    Perl is around.

    C. I don't know why it is not popular. It should be. Maybe those Web
    inventors always thought in Linux so they never wanted to push something
    binary so they selected Perl, a slower scripting.
     
    @, Oct 2, 2004
    #1
    1. Advertising

  2. @

    Daniel Tryba Guest

    In comp.lang.php @ <> wrote:
    > A benchmark in 2002 showed PHP is much slower in shell or when Apache has
    > Mod_Perl.
    >
    > With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice.


    If you want to troll, please put a little more effort in it.

    Like make up some benchmarks to support your facts.

    --

    Daniel Tryba
     
    Daniel Tryba, Oct 2, 2004
    #2
    1. Advertising

  3. @

    Joe Smith Guest

    @ wrote:

    > C. I don't know why it is not popular.


    I'd say it is because C does not have strings as a native data type.
    Other than initializing an array of char, the C compiler has no
    string manipulation built in; it requires library functions to do that.
    -Joe
     
    Joe Smith, Oct 2, 2004
    #3
  4. @ wrote:
    > With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    > choice.
    >


    You mean this regarding PHP 5's OO model? You have never looked at Perl 6's
    OO model, haven't you?


    JW
     
    Janwillem Borleffs, Oct 2, 2004
    #4
  5. @

    John Bokma Guest

    "@" <> wrote in news::

    > A benchmark in 2002 showed PHP is much slower in shell or when Apache
    > has Mod_Perl.
    >
    > With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    > choice.


    For me Perl is #1 (if possible) because PHP is probably the worst designed
    language ever. I am not sure if you can already prepare statements (MySQL),
    something I used in Perl ages ago, or still have to use all those
    whatsamacalled_quote_shebang garbage.


    --
    John MexIT: http://johnbokma.com/mexit/
    personal page: http://johnbokma.com/
    Experienced programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
     
    John Bokma, Oct 2, 2004
    #5
  6. @

    Tony Marston Guest

    "John Bokma" <> wrote in message
    news:Xns957679BFC204Bcastleamber@130.133.1.4...
    > "@" <> wrote in news::
    >
    >> A benchmark in 2002 showed PHP is much slower in shell or when Apache
    >> has Mod_Perl.
    >>
    >> With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    >> choice.

    >
    > For me Perl is #1 (if possible) because PHP is probably the worst designed
    > language ever. I am not sure if you can already prepare statements
    > (MySQL),


    Yes you CAN use prepare statemetnts with MySQL. You should be aware that
    this is a MySQL feature, not a PHP feature.

    > something I used in Perl ages ago, or still have to use all those
    > whatsamacalled_quote_shebang garbage.


    If you don't like PHP then why are you posting to the PHP newsgroup?

    --
    Tony Marston

    http://www.tonymarston.net
     
    Tony Marston, Oct 2, 2004
    #6
  7. @

    @ Guest

    > > A benchmark in 2002 showed PHP is much slower in shell or when Apache
    has
    > > Mod_Perl.
    > >
    > > With the new PHP kissing Java's ass, Perl is once again the #1 CGI

    choice.
    >
    > If you want to troll, please put a little more effort in it.
    >
    > Like make up some benchmarks to support your facts.
    >
    > --
    >
    > Daniel Tryba
    >


    google with PHP PERL BENCHMARK, you will see the results. That is the one
    back from 2002.

    http://216.239.39.104/search?q=cach...php/t24774.html php perl benchmark 2002&hl=en
     
    @, Oct 2, 2004
    #7
  8. Janwillem Borleffs wrote:

    > @ wrote:
    >> With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    >> choice.
    >>

    >
    > You mean this regarding PHP 5's OO model? You have never looked at Perl
    > 6's OO model, haven't you?


    First off, as Perl 6 doesn't really exist yet, the original flame^Wpost
    must be comparing against Perl 5.

    Second, Perl 6's OO model could yet do a few 180's.

    Third, who said anyone would use Perl 6 for CGI?

    Fourth, who said Perl 6's performance would suck?

    Fifth, I'm not saying PHP 5's performance sucks - I'm just inferring it
    from @'s flame^Wpost.
     
    Darin McBride, Oct 2, 2004
    #8
  9. Also sprach Joe Smith:

    > @ wrote:
    >
    >> C. I don't know why it is not popular.

    >
    > I'd say it is because C does not have strings as a native data type.
    > Other than initializing an array of char, the C compiler has no
    > string manipulation built in; it requires library functions to do that.


    That's a distinction in C that's moot. It has no built-in IO mechanisms
    either. You have to include a header to get this functionality. But
    nonestheless, it's still part of the language.

    Tassilo
    --
    $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
    pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
    $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
     
    Tassilo v. Parseval, Oct 2, 2004
    #9
  10. @

    Daniel Tryba Guest

    In comp.lang.php @ <> wrote:
    >>
    >> If you want to troll, please put a little more effort in it.
    >>
    >> Like make up some benchmarks to support your facts.

    >
    > google with PHP PERL BENCHMARK, you will see the results.


    That is not how it works: you make a claim, so you supply your proof. And
    I'm more interested in perl/php vs. java.

    > That is the one
    > back from 2002.


    2002 is so 2 years ago, that like ancient man.

    --

    Daniel Tryba
     
    Daniel Tryba, Oct 3, 2004
    #10
  11. @

    John Bokma Guest

    "Tony Marston" <> wrote in
    news:cjmr56$kjq$1$:

    >
    > "John Bokma" <> wrote in message
    > news:Xns957679BFC204Bcastleamber@130.133.1.4...
    >> "@" <> wrote in
    >> news::
    >>
    >>> A benchmark in 2002 showed PHP is much slower in shell or when
    >>> Apache has Mod_Perl.
    >>>
    >>> With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    >>> choice.

    >>
    >> For me Perl is #1 (if possible) because PHP is probably the worst
    >> designed language ever. I am not sure if you can already prepare
    >> statements (MySQL),

    >
    > Yes you CAN use prepare statemetnts with MySQL.
    > You should be aware
    > that this is a MySQL feature, not a PHP feature.


    How can I use it from PHP?

    >> something I used in Perl ages ago, or still have to use all those
    >> whatsamacalled_quote_shebang garbage.

    >
    > If you don't like PHP then why are you posting to the PHP newsgroup?


    Look at the headers, this has been crossed to a Perl group. Besides, I
    hope the PHP group isn't only there for people who say it's a great
    language? (which it isn't).

    --
    John MexIT: http://johnbokma.com/mexit/
    personal page: http://johnbokma.com/
    Experienced programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
     
    John Bokma, Oct 3, 2004
    #11
  12. @

    @ Guest

    > >>
    > >> If you want to troll, please put a little more effort in it.
    > >>
    > >> Like make up some benchmarks to support your facts.

    > >
    > > google with PHP PERL BENCHMARK, you will see the results.

    >
    > That is not how it works: you make a claim, so you supply your proof. And
    > I'm more interested in perl/php vs. java.
    >
    > > That is the one
    > > back from 2002.

    >
    > 2002 is so 2 years ago, that like ancient man.
    >


    I personally did my own benchmark in late 2003. I am not an expert at
    benchmarking softwares, but it is true Perl is much faster than PHP from my
    result. I used PHP/Perl in web enviroment for printing one line per hit.
     
    @, Oct 3, 2004
    #12
  13. In article <Xns9576C5FB187DCcastleamber@130.133.1.4>,
    John Bokma <> wrote:

    > "Tony Marston" <> wrote in
    > news:cjmr56$kjq$1$:
    >
    > >
    > > "John Bokma" <> wrote in message
    > > news:Xns957679BFC204Bcastleamber@130.133.1.4...
    > >> "@" <> wrote in
    > >> news::
    > >>
    > >>> A benchmark in 2002 showed PHP is much slower in shell or when
    > >>> Apache has Mod_Perl.
    > >>>
    > >>> With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    > >>> choice.
    > >>
    > >> For me Perl is #1 (if possible) because PHP is probably the worst
    > >> designed language ever. I am not sure if you can already prepare
    > >> statements (MySQL),

    > >
    > > Yes you CAN use prepare statemetnts with MySQL.
    > > You should be aware
    > > that this is a MySQL feature, not a PHP feature.

    >
    > How can I use it from PHP?


    Buy one of the many PHP books that mentions building sites and using
    MySQL. O'Reilly has PROGRAMMING PHP, which I used to develop my site.
    There are others, which I leave to you to investigate.

    If you're to strapped for funds to buy something, there's

    http://www.php.net/manual/en/

    >
    > >> something I used in Perl ages ago, or still have to use all those
    > >> whatsamacalled_quote_shebang garbage.

    > >
    > > If you don't like PHP then why are you posting to the PHP newsgroup?

    >
    > Look at the headers, this has been crossed to a Perl group. Besides, I
    > hope the PHP group isn't only there for people who say it's a great
    > language? (which it isn't).


    One thing I'm unconvinced of is security. With database applications, I
    have to put passwords to the database inside php scripts and they have
    to be readable by the web server which runs under the nobody UID.
    Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
    allows me to protect the files from group or other access as these
    scripts run as my account's UID.

    I found recently that you can put such files outside of the server's
    DOCUMENT ROOT and get access through the php include_path global, but
    the web server still needs access to the file.

    One thing I like about php is that each script is stored in the usual
    place in the user's document directory. The files are executed and the
    output is displayed without having to put everything in the ScriptAlias
    directory (usually cgi-bin).

    While php has PEAR, a depository for additional libraries written by
    others, perl has CPAN which is at least 2 orders of magnitude larger and
    more diverse. There's also lots of network and system-level things you
    can do with perl and usually someone's already done it in a CPAN module.

    This thread is about as enlightening as "which car is better". It all
    depends on where and how you're trying to get there.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
     
    Michael Vilain, Oct 3, 2004
    #13
  14. @

    Chung Leong Guest

    "Doug" <> wrote in message
    news:eQJ7d.2044$...
    >
    >
    > @ wrote:
    >
    > > C. I don't know why it is not popular. It should be. Maybe those Web
    > > inventors always thought in Linux so they never wanted to push something
    > > binary so they selected Perl, a slower scripting.

    >
    > Why don't you try assembly!!!! I bet you can get that to be running even
    > faster than C!!!
    >
    > good luck,
    > -d


    And I heard that you can get great performance by designing your own
    silicon.
     
    Chung Leong, Oct 3, 2004
    #14
  15. @

    @ Guest

    > One thing I'm unconvinced of is security. With database applications, I
    > have to put passwords to the database inside php scripts and they have
    > to be readable by the web server which runs under the nobody UID.
    > Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
    > allows me to protect the files from group or other access as these
    > scripts run as my account's UID.


    Could you tell me how others can read your files? If you set PHP as 604?

    In perl's case, if I set it as 755, does it allow everyone to read the
    script? Should I set it as 705?
     
    @, Oct 3, 2004
    #15
  16. @

    @ Guest

    > > One thing I'm unconvinced of is security. With database applications, I
    > > have to put passwords to the database inside php scripts and they have
    > > to be readable by the web server which runs under the nobody UID.
    > > Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
    > > allows me to protect the files from group or other access as these
    > > scripts run as my account's UID.

    >
    > Could you tell me how others can read your files? If you set PHP as 604?
    >
    > In perl's case, if I set it as 755, does it allow everyone to read the
    > script? Should I set it as 705?
    >


    I think as long as the directory is set as 400 then nobody will be able to
    get access to any of your files, regardless how they set mod on them
     
    @, Oct 3, 2004
    #16
  17. @

    Shawn Corey Guest

    @ wrote:
    >>In perl's case, if I set it as 755, does it allow everyone to read the
    >>script? Should I set it as 705?
    >>

    >
    >
    > I think as long as the directory is set as 400 then nobody will be able to
    > get access to any of your files, regardless how they set mod on them
    >
    >


    The files should be set to o=r,go= (400) or u=rw,go= (600). The
    directory they are in should be u=rx,go= (500) or u=rwx,go= (700).
    Directories must be executable to read the inode. The inode stores,
    among other things, the sectors where the file contents are.

    Perl modules should be placed in a directory not accessible by the
    server. Perl can access them by using 'use lib' to add the path to the
    library directory list (see perldoc lib). The permission on the modules
    should be u=rx,go= (500) and the first line:

    #!/

    This means if the server accesses the file, it will try to execute it
    and fail, making it impossible for it to display the code. This is
    important if you are under the obligation of not exposing the code to
    the public.

    --- Shawn
     
    Shawn Corey, Oct 3, 2004
    #17
  18. @ wrote:

    > Could you tell me how others can read your files? If you set PHP as 604?


    What is "set PHP as 604" supposed to mean? Are you referring to setting
    the permissions on *.php files?

    If that's what you mean, please read any basic introduction to UNIX. 604
    makes a file readable and writable by its owner, and readable by any
    other user.

    > In perl's case


    File permissions are language-independent. A file that's readable for
    Perl is readable for PHP, is readable for Java, is readable for C, etc.

    Michael is referring to a server configuration that will run CGIs with
    the permissions of the CGI's owner, instead of running them as "nobody".
    That way, you don't have to make anything world readable - you can make
    sensitive files 0600, and the CGI will be able to read them.

    > Should I set it as 705?


    No. You should read a good basic introduction to UNIX, concentrating on
    the section(s) about file permissions and ownership. That way you'll
    know what these numbers mean, and you won't have to throw them around at
    random.

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Oct 3, 2004
    #18
  19. @

    Shawn Corey Guest

    Sherm Pendley wrote:
    > If that's what you mean, please read any basic introduction to UNIX. 604
    > makes a file readable and writable by its owner, and readable by any
    > other user.


    Not so, users in the same group cannot read, write or execute the files.
    UNIX check only the user's permissions if you are the user, only the
    group's permissions if you are in that group and only the other's
    permissions if you are not the user or in the group. No cross sharing of
    permissions.

    --- Shawn
     
    Shawn Corey, Oct 3, 2004
    #19
  20. @

    Tony Marston Guest

    "John Bokma" <> wrote in message
    news:Xns9576C5FB187DCcastleamber@130.133.1.4...
    > "Tony Marston" <> wrote in
    > news:cjmr56$kjq$1$:
    >
    >>
    >> "John Bokma" <> wrote in message
    >> news:Xns957679BFC204Bcastleamber@130.133.1.4...
    >>> "@" <> wrote in
    >>> news::
    >>>
    >>>> A benchmark in 2002 showed PHP is much slower in shell or when
    >>>> Apache has Mod_Perl.
    >>>>
    >>>> With the new PHP kissing Java's ass, Perl is once again the #1 CGI
    >>>> choice.
    >>>
    >>> For me Perl is #1 (if possible) because PHP is probably the worst
    >>> designed language ever. I am not sure if you can already prepare
    >>> statements (MySQL),

    >>
    >> Yes you CAN use prepare statemetnts with MySQL.
    >> You should be aware
    >> that this is a MySQL feature, not a PHP feature.

    >
    > How can I use it from PHP?


    http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html

    >>> something I used in Perl ages ago, or still have to use all those
    >>> whatsamacalled_quote_shebang garbage.

    >>
    >> If you don't like PHP then why are you posting to the PHP newsgroup?

    >
    > Look at the headers, this has been crossed to a Perl group. Besides, I
    > hope the PHP group isn't only there for people who say it's a great
    > language? (which it isn't).


    I don't waste my time posting to a Microsoft newsgroup saying that all MS
    products suck (otherwise I'd never get anything done), so what makes you (or
    anyone else) think that you can post such comments to this group without
    getting an animated response.

    You may think that Perl is better than PHP (what is your justification?) and
    as it is still a free country (that is until President Blair finishes
    screwing up the constitution) it is your God-given right to hold that
    opinion. I think you are wrong, but it is still your right.

    --
    Tony Marston

    http://www.tonymarston.net
     
    Tony Marston, Oct 3, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andre Charbonneau

    XPath queries getting slower and slower...

    Andre Charbonneau, Feb 15, 2005, in forum: Java
    Replies:
    0
    Views:
    551
    Andre Charbonneau
    Feb 15, 2005
  2. Replies:
    2
    Views:
    434
    Greg Buchholz
    Feb 1, 2006
  3. Replies:
    4
    Views:
    411
    Graham Dumpleton
    May 21, 2007
  4. Rajive Narain
    Replies:
    0
    Views:
    1,942
    Rajive Narain
    Sep 18, 2009
  5. Jon Reed

    Is perl 5.8 slower than 5.005_03?

    Jon Reed, Dec 4, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    210
    Ilya Zakharevich
    Dec 4, 2003
Loading...

Share This Page