Gossamer Forum
Home : General : Perl Programming :

Speed Question

Quote Reply
Speed Question
I have a speed/performance question.

For a search engine script on a dedicated server, what would be faster (better behaved, etc.)...

PHP and MySQL or mod_perl and MySQL

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Speed Question In reply to
PHP / MySQL.

.. but it all comes down to how well you code.

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
If it all comes down to how well you code how can you say php/mysql is faster Wink

...and what evidence do you have to prove that mod_php is faster than mod_perl and Apache::DBI ?

Last edited by:

Paul: Mar 21, 2002, 7:55 AM
Quote Reply
Re: [Paul] Speed Question In reply to
Ah, come on! We all know that mod_php / mysql is faster than mod_perl / mysql, we just don't like to admit it! <g>.

This makes some interesting reading; not that it supports my case(?):

http://perl.apache.org/bench.txt

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
That doesn't really support your case as:

1. Hello World is not an adequate benchmark

2. It's comparing mod_perl on Windows NT vs mod_php on Linux. Not even mod_perl can overcome that. ;)

Perl is a faster language than PHP, it's generally the fact that perl scripts are run through CGI, and PHP is run directly from Apache that gives the speed difference, but if you are using mod_perl, it's going to be faster (depending on programming skill of course).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Speed Question In reply to
Alex

I *knew* this thread would catch your eye ;-)

Looking at this from the original poster's point of view. He needs to write a search engine to search a MySQL database. From my knowledge, here are the arguments for and against, in my opinion:

Perl is best in it's native form for searching text, files, data manipulation and of course it's regex engine is absolutely undoubtedly unmatched.

PHP was designed as a web-based language with good built-in database support which means for the *novice* programmer you could probably get PHP to query a database and return results to a HTML document much faster than you would in Perl without a lot or if any, programming knowledge.

For the more experienced programmer however, you'll find that you can do the task much better using Perl as it is a far superior language - and knowing how to program with mod_perl effectively will overcome your CGI issues and you will have a program that is 'as fast' as the PHP solution above but much much more powerful and flexible.

That's my take, anyway. Would you agree?

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
Come on where did you copy/paste that from Laugh

>>
for the *novice* programmer you could probably get PHP to query a database and return results to a HTML document much faster than you would in Perl without a lot or if any, programming knowledge.
<<

Faster meaning speed or amount of code?

Last edited by:

Paul: Mar 21, 2002, 10:05 AM
Quote Reply
Re: [Paul] Speed Question In reply to
Meaning anyone can churn out shitty code which will run at half decent speeds Tongue. I'm not against PHP, but from what I've seen, all it's done is encouraged people who can't code to write web apps and such. I'm not the best programmer in the world (or even close to it), but if you look at some of the code out there, it's enough to make you puke!

Back to the original question, it really depends on what you're doing (don't ask me for details Wink). PHP is quite fast, but a well written Perl script running under mod_perl can be even faster. And if you're doing something complex, it'll probably be much easier to do in Perl.

Adrian
Quote Reply
Re: [Paul] Speed Question In reply to
> Come on where did you copy/paste that from

No where. That is my geniune beliefs on the topic. I might be way off the mark, but that's my overall impression of both languages.

> Faster meaning speed or amount of code?

Both really. For startes, you can put all your PHP code in your exisiting HTML documents which makes it easier for novice programmers* to code.

And speed wise, I believe that you can pick up PHP in a day and get it to query a database and return results faster than you would doing so with limited knowledge of Perl. If you knew Perl well, however, then you would be better off with a more powerful, and faster solution using Perl.

* I use the term 'programmer' very loosely here.

- wil

Last edited by:

Wil: Mar 21, 2002, 10:29 AM
Quote Reply
Re: [brewt] Speed Question In reply to
> And if you're doing something complex, it'll probably be much easier
> to do in Perl.

And far more powerful.

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
Actually, I am the one who posted this...

I am not going write any code (that would be funny!). I am looking at 2 different PPC search engines and was trying to figure out what platform would be the fastest to build apon. They both need modifications. Any suggestions as to the best/fastest PPC engine out there.

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Speed Question In reply to
>>
Any suggestions as to the best/fastest PPC engine out there.
<<

its staring right at you :) ....Links SQL / PPC plugin.
Quote Reply
Re: [Paul] Speed Question In reply to
I have Links SQL and the email Program. So I am familier with Gossamer-threads.

Does anyone know a site (or two) that is using LinksSQL and the PPC addon?

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Speed Question In reply to
What is PPC? Blush

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
pauls perfect code
Quote Reply
Re: [Paul] Speed Question In reply to
haha <g>

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
I'll humor you..PPC is Pay Per Click.

Customers bid to rank higher in the search listings. Is there anyone using Links SQL and the PPC addon?

Back to my original question...All things equal, mod_perl and mySQL is a little faster than PHP and mySQL?

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Speed Question In reply to
aha. do people still use those systems?!

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
In Reply To:
aha. do people still use those systems?!
Sure do, I'm just writing a PPC banner rotation system...they can update their funds via PayPal or Clickbank Smile Not quite so advanced as GT's Goto Plugin, but I'm impressed with it...lol

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [A.J.] Speed Question In reply to
Yeah, but what I was saying was.. do your advertisers still pay for their listing? And why would they?

- wil
Quote Reply
Re: [Wil] Speed Question In reply to
>>And why would they? <<

Higher ranking ;)

Last edited by:

Paul: Mar 22, 2002, 6:38 AM
Quote Reply
Re: [eddie2] Speed Question In reply to
Are there any live sites that are using GT's Goto Plugin? I am currently using another script and need more speed and flexability. You can see what I have now, it is not really live yet...

http://www-wholesale.com/main.html

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Speed Question In reply to
Hi Ed,

There are now more than 15 websites running Links SQL's Pay-per-click engine. However, due to the recent release of it, there is no mature site yet on the order of overture.com.

Some of the websites are:

http://www.bigfishtackle.com in their Guides and Charters section.

http://www.abcdentist.com run by one of our Forum regulars.

http://www.seekahost.com

http://www.250000.co.uk

For more information, please contact me directly.

Jack.
-------------------------------------------------------------------------------------------
Jack Ong, C.O.O., Gossamer Threads, Inc.
9th Floor, 100 West Pender, Vancouver, BC, Canada, V6B 1R8
Email: <jack@gossamer-threads.com>
Tel: (604) 687-5804 Fax: (604) 687-5806