Word frequencies -- Python or Perl for performance?

Aahz aahzpy at panix.com
Wed Mar 20 14:36:27 EST 2002


In article <mailman.1016646247.29851.python-list at python.org>,
Nick Arnett <narnett at mccmedia.com> wrote:
>Aahz:
>>
>> Well, well, well, long time no see.  Why not just use Verity?  ;-)
>
>I was wondering if that was you -- how many Aahzes could there be in the
>world?

Quite a few, actually, but only one or two others use it as something
other than a nickname.

>> Seriously, for this kind of work, it's quite likely that Perl can be
>> coded to be a bit faster than Python, but if you're expecting to need to
>> do a lot of iterative work on your algorithms, programmer time will
>> count for a lot, and Python will probably win there.
>
>I've actually done a lot of it in Perl already and I'm re-coding it in
>Python.  I'm astounded and very happy at how much faster I'm able to code in
>Python.  And I can read it a few weeks later without squinting too hard.

<ding!><ding!><ding!>  ;-)

>Say, how does it look to find a marketing weenie on the Python list?
>Actually, I've always coded, I just sometimes manage to supress the urge.
>The work I'm doing now is closely related to what I was working on when
>Verity lured me, back when the Web was a baby.

We get all types here; that's one of the things I love about the Python
community.

>> Given that it sounds like you want to create your own inverted word
>> index and do some sorting/searching based on word counts, it'll be hard
>> to get more bang for the buck than a real database.  Unless you're on a
>> shoestring, consider getting a commercial database; you should probably
>> also check to see whether MySQL or PostgreSQL will give you better
>> performance.
>
>I'm using MySQL; that's what the Perl stuff was talking to.

Well, in the "Java and Python" thread, someone posted an URL that said
that MySQL comes close to Oracle for speed, at least when talking to
Java:

http://www.eweek.com/print_article/0,3668,a=23115,00.asp

>Say, do you know if anyone has created a Python wrapper for VDK (Verity
>Developer Kit, for the rest of you)?  Eventually, when I want to bear the
>cost, I'll probably want to use it.  For now, though, I'm trying to stick
>with open source tools for anything that gets deployed.

When I was working at SearchButton.com, we wrote one, and it's quite
handy to use VDK from Python.  It was a lot easier than writing the
equivalent from Perl.  But the code is lost along with SB.com.  <sigh>
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.  --Aahz



More information about the Python-list mailing list