Search the web
Sign In
New User? Sign Up
python-list · Python List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: how fast is Python?   Message List  
Reply | Forward Message #106141 of 122067 |
Re: how fast is Python?

Irmen de Jong wrote:

> Python is fast enough for me, especially 2.3.
>
> Profile & code slow parts as C extensions.
> Include your own assembly there if so desired.
>
> Investigate Psyco. There was one example on this
> newsgroup that showed that Python+psyco actually
> outperformed the same program in compiled C.

I think (but will gladly stand corrected if I'm wrong!) that
this is a misinterpretation of some code I posted -- the
C code (crazily) used pow(x,2.0), the Python one (sanely)
x*x -- within a complicated calculation of erf, and that
one malapropism in the C code was what let psyco make
faster code than C did. With C fixed to use x*x -- as any
performance-aware programmer will always code -- the
two ran neck to neck, no advantage to either side.


Alex

--
http://mail.python.org/mailman/listinfo/python-list



Thu Aug 21, 2003 1:19 pm

aleax@...
Send Email Send Email

Forward
Message #106141 of 122067 |
Expand Messages Author Sort by Date

"dan" ... The extension modules run at optimized C speed because they *are* optimized C. For pure python applications, Psyco can provide just-in-time native ...
Raymond Hettinger
vze4rx4y@...
Send Email
Aug 21, 2003
5:51 am

... I think (but will gladly stand corrected if I'm wrong!) that this is a misinterpretation of some code I posted -- the C code (crazily) used pow(x,2.0), the...
Alex Martelli
aleax@...
Send Email
Aug 21, 2003
6:26 am

... Whoops, I missed that :) Thanks for the clarification. Nevertheless, a Psyco-optimized piece of Python code that runs as fast as compiled C is still very...
Irmen de Jong
irmen@-NOSPAM-REMOVET...
Send Email
Aug 21, 2003
8:21 am

Irmen de Jong wrote: ... If anybody does have an actual example (idealy toy-sized:-) where psyco's JIT does make repeatably faster code than a C compiler...
Alex Martelli
aleax@...
Send Email
Aug 21, 2003
8:56 am

On Thu, 21 Aug 2003 06:40:04 +0200, Michael Peuser paused, took a deep ... Wow! I've found wx to be way slower than Tkinter. On a P133 running Win98, a...
David McNab
postmaster@...
Send Email
Aug 21, 2003
9:14 am

... I did a benchmark some time ago (nothing optimised): PURPOSE: The purpose of this technical report is to gauge the relative speed of the languages: VB,...
Mark Carter
cartermark46@...
Send Email
Aug 21, 2003
12:19 pm

If you haven't seen this, you should check it out. It compares a variety of languages to each other, and it's probably the best site on the internet for...
Travis Whitton
whitton@...
Send Email
Aug 21, 2003
3:10 pm

... C is roughly 10 to 100 times faster than Python, though of course it's easy to find cases outside of this range, on either side. I use 30 as a general...
Peter Hansen
peter@...
Send Email
Aug 21, 2003
3:27 pm

... On the strength of this thread, I investigated Psyco. Results of a ... def calcPi(iterations): pi4 = 1.0 for i in xrange(1, iterations): denominator =...
Neil Padgen
neil.padgen@...
Send Email
Aug 21, 2003
3:31 pm

cartermark46@... (Mark Carter) wrote in message ... Although, as the saying goes, there's no such thing as a slow language - only slow implementations. ...
Mark Carter
cartermark46@...
Send Email
Aug 21, 2003
4:50 pm

Mark Carter wrote: ... Interesting. One wonders what and where you measured, e.g: [alex@lancelot gmpy]$ cat a.cpp int main() { double X = 0.5; for(int i = 0;...
Alex Martelli
aleax@...
Send Email
Aug 21, 2003
5:26 pm

I don't know what Mark Carter wanted to measure either, but I'd like to mention that when I compile "a.cpp" on my system with the flags Alex used, the...
Jeff Epler
jepler@...
Send Email
Aug 22, 2003
1:37 am

... Consider the percentage of software projects for which the total number of hours of developer time over the life of the project exceeds the total number of...
achrist@...
Send Email
Aug 21, 2003
5:26 pm

Travis Whitton ... Though there's also pleac.sf.net which isn't for timings but does show how the different languages would be used to do the same thing. And I...
Andrew Dalke
adalke@...
Send Email
Aug 21, 2003
5:44 pm

"Neil Padgen" <neil.padgen@...> schrieb im Newsbeitrag news:bi2ki9$pai$1@.... ... [...] ... This is certainly correct. My...
Michael Peuser
mpeuser@...
Send Email
Aug 21, 2003
7:07 pm

"David McNab" <postmaster@...> schrieb im Newsbeitrag news:pan.2003.08.21.09.07.20.100414@.... ... Of course! The wx DLL is mor ethan 6 MB...
Michael Peuser
mpeuser@...
Send Email
Aug 21, 2003
7:23 pm

... In a way this comes back to practicality vs. purity. In a synthetic benchmark where one function is called repeatedly with homogeneous data, it's hard to...
Jimmy Retzlaff
jimmy@...
Send Email
Aug 22, 2003
1:01 am

Peter Hansen <peter@...> wrote in message news:<3F44DFEB.60AB6492@...>... ... I pretty much agree. The point of my question was not to knock...
dan
danbmil99@...
Send Email
Aug 22, 2003
1:48 am

... He had 1-X*X. Since X starts at 0.5, this will never go leave the range 0 to 1. Andrew dalke@... -- ...
Andrew Dalke
adalke@...
Send Email
Aug 22, 2003
6:21 am

... Oh, I completely misinterpreted the question then. I thought you wanted practical information. _In principle_, (which I'll interpret as "in theory"),...
Peter Hansen
peter@...
Send Email
Aug 22, 2003
6:25 pm

On 20 Aug 2003 13:08:20 -0700, rumours say that danbmil99@... ... The most important time for me is the time *I* invest in a program, since when it's...
ChristosTZOTZIOY Geor...
tzot@...
Send Email
Aug 23, 2003
12:43 am

Alex Martelli <aleax@...> wrote in message news:<qJ%0b.116361$cl3.3506646@...>... ... Actually, as I posted in the C sharp thread of few weeks...
Michele Simionato
mis6@...
Send Email
Aug 23, 2003
11:22 am

In article <3F44DFEB.60AB6492@...>, ... . . . I just think Peter's wise counsel bears repeating. Andrew gave the same quantities, incidentally....
Cameron Laird
claird@...
Send Email
Aug 24, 2003
3:14 pm

... A bit off-topic perhaps, but I'd be interested in the details of this anecdote. -- Steven Taschuk o- @ ...
Steven Taschuk
staschuk@...
Send Email
Aug 27, 2003
9:47 pm

... Okay. I know someone who really likes optimized programming. The kind of person who will develop an in-memory compiler to generate specialized assembly...
Andrew Dalke
adalke@...
Send Email
Aug 27, 2003
11:15 pm

... Have you heard of Jython - python language running on a java VM? It's kind of double interpreted - the python source is converted to JVM bytecode, and then...
Steve Horsley
steve.horsley1@...
Send Email
Aug 28, 2003
7:53 pm

... Jython faster than Python? We did little test and it doesn't seem, look: http://tinyurl.com/liix -- Lawrence "Rhymes" Oluyede http://loluyede.blogspot.com ...
Lawrence Oluyede
raims@...
Send Email
Aug 28, 2003
8:20 pm

In article <pan.2003.08.28.19.40.59.802803@..._SPAM.net>, Steve Horsley <steve.horsley1@..._SPAM.net> writes ... experience with ReportLab suggests...
Robin Becker
robin@...
Send Email
Aug 29, 2003
9:17 am

... The advantages being? Regards, Andrew. -- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac@......
Andrew MacIntyre
andymac@...
Send Email
Aug 29, 2003
1:20 pm

[Steve Horsley] ... [Lawrence Oluyede] ... Please bear in mind that the test code included the start up time for interpreter. For jython, this is a high cost,...
Alan Kennedy
alanmk@...
Send Email
Aug 29, 2003
2:36 pm
 First  |  |  Next > Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help