Re: Python performance

2014-03-08 Thread Ned Batchelder
On 3/8/14 7:53 AM, JCosta wrote: I did some work in c# and java and I converted some application to Python; I noticed Python is much slower than the other languages. Is this normal ? Thanks Your question, and the replies so far in this thread, have overlooked the difference between language

Re: Python performance

2014-03-08 Thread Mark Lawrence
On 08/03/2014 18:30, JCosta wrote: Sábado, 8 de Março de 2014 12:53:57 UTC, JCosta escreveu: I did some work in c# and java and I converted some application to Python; I noticed Python is much slower than the other languages. Is this normal ? Thanks ... Thanks for the help (C

Re: Python performance

2014-03-08 Thread JCosta
Sábado, 8 de Março de 2014 12:53:57 UTC, JCosta escreveu: > I did some work in c# and java and I converted some application to Python; I > noticed Python is much slower than the other languages. > > > > Is this normal ? > > Thanks ... Thanks for the help (Chris, Tim and Marko) an

Re: Python performance

2014-03-08 Thread Marko Rauhamaa
JCosta : > I did some work in c# and java and I converted some application to > Python; I noticed Python is much slower than the other languages. > > Is this normal ? Yes. The main reason is the dot notation, which in C through Java is implemented by the compiler as a fixed offset to a memory str

Re: Python performance

2014-03-08 Thread Tim Chase
On 2014-03-08 04:53, JCosta wrote: > I did some work in c# and java and I converted some application to > Python; I noticed Python is much slower than the other languages. > > Is this normal ? It depends. Did you write C#/Java in Python (i.e., use C# or Java idioms in Python), or did you write P

Re: Python performance

2014-03-08 Thread Chris Angelico
On Sat, Mar 8, 2014 at 11:53 PM, JCosta wrote: > I did some work in c# and java and I converted some application to Python; I > noticed Python is much slower than the other languages. > > Is this normal ? > Thanks The first thing to look at is the conversion. If you convert idiomatic Java code i

Re: Python performance

2013-08-03 Thread Stefan Behnel
Wayne Werner, 03.08.2013 15:09: > On Fri, 2 Aug 2013, Schneider wrote: >> I have to write a small SMTP-Relay script (+ some statistic infos) and >> I'm wondering, if this >> can be done in python (in terms of performance, of course not in terms of >> possibility ;) ). >> >> It has to handle around

Re: Python performance

2013-08-03 Thread Wayne Werner
On Fri, 2 Aug 2013, Schneider wrote: Hi list, I have to write a small SMTP-Relay script (+ some statistic infos) and I'm wondering, if this can be done in python (in terms of performance, of course not in terms of possibility ;) ). It has to handle around 2000 mails per hour for at least 8h

Re: Python performance

2013-08-02 Thread Chris Angelico
On Fri, Aug 2, 2013 at 1:00 PM, Schneider wrote: > Hi list, > > I have to write a small SMTP-Relay script (+ some statistic infos) and I'm > wondering, if this > can be done in python (in terms of performance, of course not in terms of > possibility ;) ). > > It has to handle around 2000 mails per

Re: Python performance

2013-08-02 Thread Grant Edwards
On 2013-08-02, Grant Edwards wrote: > On 2013-08-02, Schneider wrote: > >> I have to write a small SMTP-Relay script (+ some statistic infos) >> and I'm wondering, if this can be done in python (in terms of >> performance, of course not in terms of possibility ;) ). >> >> It has to handle around

Re: Python performance

2013-08-02 Thread Grant Edwards
On 2013-08-02, Schneider wrote: > I have to write a small SMTP-Relay script (+ some statistic infos) > and I'm wondering, if this can be done in python (in terms of > performance, of course not in terms of possibility ;) ). > > It has to handle around 2000 mails per hour for at least 8hours a day

Re: Python performance

2013-08-02 Thread Chris Angelico
On Fri, Aug 2, 2013 at 2:16 PM, Schneider wrote: > Queuing the mails for a while is not possible, because the tool should sit > between the client and smtp-server. > It should act as proxy, not as server. I've written an SMTP proxy (primary purpose: check SPF records; secondary purpose: rate-limi

Re: Python performance

2013-08-02 Thread Schneider
On 08/02/2013 03:09 PM, Ray Cote wrote: - Original Message - From: "Schneider" To: python-list@python.org Sent: Friday, August 2, 2013 8:00:09 AM Subject: Python performance Hi list, I have to write a small SMTP-Relay script (+ some statistic infos) and I'm wondering, if this can be d

Re: Python performance

2013-08-02 Thread Ray Cote
- Original Message - > From: "Schneider" > To: python-list@python.org > Sent: Friday, August 2, 2013 8:00:09 AM > Subject: Python performance > > Hi list, > > I have to write a small SMTP-Relay script (+ some statistic infos) > and > I'm wondering, if this > can be done in python (in ter

Re: Python performance

2013-08-02 Thread Schneider
On Fri 02 Aug 2013 02:59:26 PM CEST, Tim Chase wrote: On 2013-08-02 14:00, Schneider wrote: I have to write a small SMTP-Relay script (+ some statistic infos) and I'm wondering, if this can be done in python (in terms of performance, of course not in terms of possibility ;) ). It has to handle

Re: Python performance

2013-08-02 Thread Tim Chase
On 2013-08-02 14:00, Schneider wrote: > I have to write a small SMTP-Relay script (+ some statistic infos) > and I'm wondering, if this > can be done in python (in terms of performance, of course not in > terms of possibility ;) ). > > It has to handle around 2000 mails per hour for at least 8hour

Re: python performance on Solaris

2009-10-16 Thread Dieter Maurer
Antoine Pitrou writes on Thu, 15 Oct 2009 16:25:43 + (UTC): > Le Wed, 14 Oct 2009 22:39:14 -0700, John Nagle a écrit : > > > > Note that multithreaded compute-bound Python programs really suck > > on multiprocessors. Adding a second CPU makes the program go slower, > > due to a lame mec

Re: python performance on Solaris

2009-10-15 Thread Adam Vande More
On Thu, Oct 15, 2009 at 4:35 PM, Aahz wrote: > In article < > 1a4707f5-85be-4f5f-ac3e-cf8f5bd21...@b15g2000yqd.googlegroups.com>, > inaf wrote: > > > >I have been following this group for quite some time and I figured > >(after searching enough on google --and on this group-- and not finding >

Re: python performance on Solaris

2009-10-15 Thread Aahz
In article <1a4707f5-85be-4f5f-ac3e-cf8f5bd21...@b15g2000yqd.googlegroups.com>, inaf wrote: > >I have been following this group for quite some time and I figured >(after searching enough on google --and on this group-- and not finding >anything useful) I could pose this question here. Can anyone

Re: python performance on Solaris

2009-10-15 Thread Antoine Pitrou
Le Wed, 14 Oct 2009 22:39:14 -0700, John Nagle a écrit : > > Note that multithreaded compute-bound Python programs really suck > on multiprocessors. Adding a second CPU makes the program go slower, > due to a lame mechanism for resolving conflicts over the global > interpreter lock. I'm not

Re: python performance on Solaris

2009-10-14 Thread John Nagle
inaf wrote: I have been following this group for quite some time and I figured (after searching enough on google --and on this group-- and not finding anything useful) I could pose this question here. Can anyone shed some light on python's performance on Solaris? Note that multithreaded com

Re: python performance on Solaris

2009-10-14 Thread inaf
On Oct 14, 7:15 am, Antoine Pitrou wrote: > inaf gmail.com> writes: > > > > > Good point. I failed to compare the CPU power on these machines.. 32 > > bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I > > guess that explains :) Thank you for the tip.. > > You have to compare no

Re: python performance on Solaris

2009-10-14 Thread James Matthews
I use python in almost the same environment. I use it on Joyent and on the Rackspace cloud. Joyent is faster for a few reasons (cpu bursting and faster disks) but these aren't real benchmarks until they are on the same machines. James On Wed, Oct 14, 2009 at 9:59 AM, Jorgen Grahn > wrote: > On

Re: python performance on Solaris

2009-10-14 Thread Jorgen Grahn
On Wed, 2009-10-14, Antoine Pitrou wrote: > inaf gmail.com> writes: >> >> Good point. I failed to compare the CPU power on these machines.. 32 >> bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I >> guess that explains :) Thank you for the tip.. > > You have to compare not only

Re: python performance on Solaris

2009-10-14 Thread Antoine Pitrou
inaf gmail.com> writes: > > Good point. I failed to compare the CPU power on these machines.. 32 > bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I > guess that explains :) Thank you for the tip.. You have to compare not only CPU frequencies but the CPU models. Recently Sun h

Re: python performance on Solaris

2009-10-11 Thread inaf
On Oct 11, 6:59 am, Antoine Pitrou wrote: > inaf gmail.com> writes: > > > > > My code seem to > > return lookups from a in memory data structure I build combining bunch > > of dictionaries and lists 6-8 times faster on a 32 bit Linux box than > > on a Solaris zone. > > Well, if your workload is C

Re: python performance on Solaris

2009-10-11 Thread Antoine Pitrou
inaf gmail.com> writes: > > My code seem to > return lookups from a in memory data structure I build combining bunch > of dictionaries and lists 6-8 times faster on a 32 bit Linux box than > on a Solaris zone. Well, if your workload is CPU-bound, the issue here is not really Solaris vs. Linux bu