Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Re: Speed?

 
Thread Tools Search this Thread
Old 01-03-2004, 07:27 AM   #1
Default Re: Speed?


>>>>> "EP" == EP <> writes:

EP> On questions of the suitability of Python for CGI, embedded
EP> apps, etc., execution speed comes to mind. I previously read
EP> some comparisons which did not show Python in a good light in
EP> this regard: i.e. Python is slow compared to Perl, C++, Java.

Donald Knuth, God of Computer Science, said "Premature optimization is
the root of all evil". The essence of the quote is that you shouldn't
code for performance until the current implementation is hogging a
disproportionate chunk of the CPU cycles. In layman's terms: code
something that works, and when you hit a performance bottleneck, run a
profiler, find the inefficiencies, and refactor looking for a 2-20x
performance boost.

I write python apps for the hospital I work for, mainly for epilepsy
patients. The EEG data files are large, several hundred megabytes
each, and in addition we have CT and MRI 3D image data to incorporate.
python, with judicious use of Numeric and pygtk, is more than enough
to handle the everyday cases. Are you dealing with several hundred
megabytes per record or more? If not, my guess is that you can handle
your use cases in python with a little careful thought.

In a Nut's Hell, write a prototype app. If you are unsatisfied with
performance, post here. Otherwise, mark today as the last day you
ever coded perl, as I fondly mark that day 5 years ago.

JDH



John Hunter
  Reply With Quote
Old 01-03-2004, 03:26 PM   #2
Aahz
 
Posts: n/a
Default Optimized quoting (was Re: Speed?)
In article <mailman.43.1073115353.12720.python->,
John Hunter <> wrote:
>
>Donald Knuth, God of Computer Science, said "Premature optimization is
>the root of all evil".


If Knuth is God, then Hoare is God's father:

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare (often misattributed to Knuth, who was himself quoting Hoare)

"We should forget about small efficiencies, say about 97% of the time:
premature optimization is the root of all evil." --Knuth restates Hoare
--
Aahz () <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote
programs, then the first woodpecker that came along would destroy civilization.


Aahz
  Reply With Quote
Old 01-05-2004, 04:56 PM   #3
Michael Hudson
 
Posts: n/a
Default Re: Optimized quoting (was Re: Speed?)
Grr...

(Aahz) writes:

> In article <mailman.43.1073115353.12720.python->,
> John Hunter <> wrote:
> >
> >Donald Knuth, God of Computer Science, said "Premature optimization is
> >the root of all evil".

>
> If Knuth is God, then Hoare is God's father:
>
> "Premature optimization is the root of all evil in programming."
> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting Hoare)


Cite?

> "We should forget about small efficiencies, say about 97% of the time:
> premature optimization is the root of all evil." --Knuth restates Hoare


This is from "Structured Programming with goto Statements", and he's
not quoting Hoare at this point. Really!

Cheers,
mwh

--
Or here's an even simpler indicator of how much C++ sucks: Print
out the C++ Public Review Document. Have someone hold it about
three feet above your head and then drop it. Thus you will be
enlightened. -- Thant Tessman


Michael Hudson
  Reply With Quote
Old 01-05-2004, 07:53 PM   #4
Aahz
 
Posts: n/a
Default Re: Optimized quoting (was Re: Speed?)
In article <>,
Michael Hudson <> wrote:
> (Aahz) writes:
>> In article <mailman.43.1073115353.12720.python->,
>> John Hunter <> wrote:
>>>
>>>Donald Knuth, God of Computer Science, said "Premature optimization is
>>>the root of all evil".

>>
>> If Knuth is God, then Hoare is God's father:
>>
>> "Premature optimization is the root of all evil in programming."
>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting Hoare)

>
>Cite?


http://www.haskell.org/pipermail/has...ry/001461.html

Anybody have a copy of _Literate Programming_ to check?
--
Aahz () <*> http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?


Aahz
  Reply With Quote
Old 01-11-2004, 05:07 AM   #5
Martin Maney
 
Posts: n/a
Default Re: Optimized quoting (was Re: Speed?)
Aahz <> wrote:
> In article <>,
> Michael Hudson <> wrote:
>> (Aahz) writes:
>>> "Premature optimization is the root of all evil in programming."
>>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting Hoare)

>>
>>Cite?


> http://www.haskell.org/pipermail/has...ry/001461.html


> Anybody have a copy of _Literate Programming_ to check?


Surely someone else must have checked this before now. Perhaps the
reply went astray, or isn't threaded properly so that I don't see it.
Anyway. Yes, Knuth says, in a parenthetical aside on page 276, "But I
also knew, and forgot, Hoare's dictum that premature optimization is
the root of all evil in programming."

Which fails to answer the quite reasonable wish for a cite attributing
the phrase, rather than the concept, to Hoare. (a distinction Cally
likes to troll in her .sig, as you know.)

(I can't believe that I have, by dint of rigorously ignoring all but
the most fascinating threads, gotten close enough to the working end of
this dynamic work-always-in-progress to feel I might have something to
add other than a belated footnote. Maybe if I got up at 2:30 AM every
day I could find time to read clp!)

--
One lesson I've learned from my years as Linux's hood ornament is that
there's something worse: some folks can't be content to just take things
too seriously on their own. They're not happy unless they can convince
others to go along with their obsession. -- Linus


Martin Maney
  Reply With Quote
Old 01-19-2004, 03:26 PM   #6
Aahz
 
Posts: n/a
Default Re: Optimized quoting (was Re: Speed?)
In article <btqlm8$s6d$>,
Martin Maney <> wrote:
>Aahz <> wrote:
>> In article <>,
>> Michael Hudson <> wrote:
>>> (Aahz) writes:
>>>>
>>>> "Premature optimization is the root of all evil in programming."
>>>> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting Hoare)
>>>
>>>Cite?

>
>> http://www.haskell.org/pipermail/has...ry/001461.html
>> Anybody have a copy of _Literate Programming_ to check?

>
>Surely someone else must have checked this before now. Perhaps the
>reply went astray, or isn't threaded properly so that I don't see it.
>Anyway. Yes, Knuth says, in a parenthetical aside on page 276, "But I
>also knew, and forgot, Hoare's dictum that premature optimization is
>the root of all evil in programming."
>
>Which fails to answer the quite reasonable wish for a cite attributing
>the phrase, rather than the concept, to Hoare. (a distinction Cally
>likes to troll in her .sig, as you know.)


Well, I tried sending e-mail to Hoare; he hasn't responded. Knuth
doesn't do e-mail, and I'm not sure whether I should bother sending him
snail mail. If anyone else feels like doing it (and I suppose he's more
likely to respond if multiple people do), here's his address:

Prof. Donald E. Knuth
Computer Science Department
Gates Building 4B
Stanford University
Stanford, CA 94305-9045 USA
--
Aahz () <*> http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?


Aahz
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD Verdict reviews: SPEED RACER: VOLUME 4, MERMAID FOREST: UNQUENCHABLE THIRST (VOLUME 3), and more! DVD Verdict DVD Video 0 04-13-2006 09:22 AM
Playstation3 getting a 2x speed Blu-ray disc drive? DVD Video 0 08-03-2005 10:41 PM
Reducing DVD Write speed with Nero 6 on Sony DVD writer Guido DVD Video 0 11-18-2004 10:23 PM
DVD Verdict reviews: SPEED RACER: LIMITED COLLECTOR'S EDITION, VOLUME TWO and more! DVD Verdict DVD Video 0 07-29-2004 10:03 AM
CPU higher speed than the mainboard can support. Raymond A+ Certification 0 12-23-2003 07:01 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46