print statements and profiling a function slowed performance

Chris Angelico rosuav at gmail.com
Sat Jun 28 22:32:41 EDT 2014


On Sun, Jun 29, 2014 at 12:25 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> On Sunday, June 29, 2014 12:50:19 AM UTC+5:30, Marko Rauhamaa wrote:
>> Chris Angelico wrote:
>
>> > Threading is a focus of so many myths. People who don't understand it
>> > think that threads are magic pixie dust that fixes everything, or else
>> > magic pixie dust that breaks everything. Or both, at the same time.
>> > Neither notion is true.
>
>> I'm in the latter camp.
>
>> More precisely: threads have their uses but they are used far too much
>> and not feared nearly enough.
>
> Third Camp:
> Since both views are true:
>
> Chris: Threads solve a large class of important problems
> Marko: Threads are horribly error prone

Not strictly my view. I said that both extremes ("threads fix
everything" and "threads break everything") are quite wrong; the truth
is that threading is a tool, like any other, and you have to know when
it's appropriate to use each tool.

ChrisA



More information about the Python-list mailing list