[Tutor] Finding prime numbers script runs much faster when run viabash shell than idle

Jaime Gago contact at jaimegago.com
Sat Apr 2 20:17:54 CEST 2011


Ok I understand now, thank you very much!
On Apr 2, 2011, at 1:05 AM, Alan Gauld wrote:

> "Jaime Gago" <contact at jaimegago.com> wrote 
>> When I run it via IDLE it's taking way more time than if I run it via a (bash) shell (on Os X 10.6) while doing $>python -d mypp.py
>> I'm really curious from a performance perspective as to what could cause such a noticeable difference.
> 
> IDLE is a development environment. As such it adds lots of extra hooks and debugging things to the execution environment. (For example it traps things like Ctrl C) In addition, being a GUI written in Tkinter, it has a slower output mechanism
> so print statements will be slower.
> 
> IDLE is not intended to be used to run code except during development, it has ot been built for speed but for debugging.
> 
> HTH,
> 
> -- 
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list