Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.051 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.01; 'fixes': 0.07; 'latter': 0.09; 'cc:addr:python-list': 0.11; 'both,': 0.16; 'enough.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limiting': 0.16; 'magic': 0.16; 'opposite': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'nearly': 0.26; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'feature': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'explained': 0.31; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'too': 0.37; 'times': 0.62; 'more': 0.64; 'love': 0.65; 'safe': 0.72; 'dust': 0.84; 'everything,': 0.84; 'everything.': 0.84; 'fearing': 0.84; 'notion': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=L2JVFPC4dom3CpheXmK/UAmV9lxWUyrlpYmCDs126yc=; b=nOhAhqmwMXaG1rOvyTqSzpV3ylAb11Z9JGWITWWcjvXm/ZNrXuyfkgtCJngkeo/vzL WW4ynJXI5WgN0OALCly4m/McCYxEtszTE0ocvcx7jJfUNuq+pqkXnOrzwKf/B84UDjJ6 vStZomsK3C1z/KI/y9yP/z45sPnzuwu2Ym9L82Q2Vsx+E2VE4XxOUv1XrRRIFHklF2lA b2LhUvInlqlHpn5sUFYJ8byeAcwDV3kUTsism2aXBFeLAkw24HHMzFPGzLLxiFeVrL3s AmbT6xWhmq90MvbXHQ5gVDdmZrFqv98m/kHthRMnt0RNNYzbMfjyvR4qH3f5qTQctZlJ BIpQ== MIME-Version: 1.0 X-Received: by 10.58.234.199 with SMTP id ug7mr5904657vec.40.1403998236445; Sat, 28 Jun 2014 16:30:36 -0700 (PDT) In-Reply-To: <87wqc0hmdo.fsf@elektro.pacujo.net> References: <53acdd24$0$29985$c3e8da3$5496439d@news.astraweb.com> <87wqc0hmdo.fsf@elektro.pacujo.net> Date: Sun, 29 Jun 2014 09:30:36 +1000 Subject: Re: print statements and profiling a function slowed performance From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403998239 news.xs4all.nl 2942 [2001:888:2000:d::a6]:54903 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73717 On Sun, Jun 29, 2014 at 5:20 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> 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. And as I've explained several times in response to your other posts, that's just as much a myth as the opposite extreme :) Fearing a perfectly safe feature shackles you, which is better than falling head-over-ears in love with something and using it everywhere, but it's still limiting what you can do. Threads aren't that scary! ChrisA