Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'level,': 0.07; 'plenty': 0.07; 'slow.': 0.09; 'worse': 0.09; 'wrote': 0.14; '24,': 0.16; 'concurrency': 0.16; 'incorrect': 0.16; 'once.': 0.16; 'program?': 0.16; 'subject:? - ': 0.16; 'subject:Pypy': 0.16; 'subject:threads': 0.16; 'throughput': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'feb': 0.22; '>>>': 0.22; 'programming': 0.22; 'java': 0.24; 'least': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '25,': 0.31; 'checked': 0.32; 'running': 0.33; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'subject:?': 0.36; 'too': 0.37; 'two': 0.37; 'performance': 0.37; 'being': 0.38; 'ends': 0.38; 'stopped': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'guy': 0.60; 'name': 0.63; 'life': 0.66; 'close': 0.67; 'caused': 0.69; 'intelligent': 0.74; '2015': 0.84; 'lighter': 0.84; 'subject:Are': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=8ylWH63iObWv5HwMbWdmkteAk5mQ63wr1wMcL985LkM=; b=pDkJNZCpYH+qILeVp+VulJHRRzCHEWIho3+ihi+n9yqu86yKI2sTAXlUJ5IESwllQr vX72H19p/3iPFyyNIFdcJseyMM+A6vPtsppQvEhHF48GTfs2dD1nRPS3lAjTBf/BUvyf Y+2PvF/iijtt2qHtTrFWhOvO88Tk1KkDhM5tdERe5JzAjA9BTpIdXRemxu0MzEsnrxIT XY5k26dzWLUqGQAh2XSyrHr9Hv1hxZSfRuTiQp/f7y5lPVtNXLePKhmhQtrFrMe3LOXQ Oe5upfIcI/ssZhr7RRLXOaG2x9LjvXVVloeCChADEWjCL4xajAjLx6FACzL1YJ3CPJr+ F1Jg== X-Received: by 10.70.30.3 with SMTP id o3mr2753978pdh.114.1424844173036; Tue, 24 Feb 2015 22:02:53 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <87fv9xdb22.fsf@jester.gateway.pace.com> <54ea7ff4$0$12983$c3e8da3$5496439d@news.astraweb.com> <87zj85bcyu.fsf@jester.gateway.pace.com> <87lhjpb89i.fsf@jester.gateway.pace.com> <87h9udb1eq.fsf@jester.gateway.pace.com> <87bnkkb22u.fsf@jester.gateway.pace.com> <87lhjnang1.fsf@jester.gateway.pace.com> <87bnkjenpp.fsf@elektro.pacujo.net> <8761aqamss.fsf@jester.gateway.pace.com> <87zj82bm15.fsf@elektro.pacujo.net> <87pp8ybl14.fsf@elektro.pacujo.net> From: Ian Kelly Date: Tue, 24 Feb 2015 23:02:12 -0700 Subject: Re: Are threads bad? - was: Future of Pypy? To: Python 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424844176 news.xs4all.nl 2888 [2001:888:2000:d::a6]:51459 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86380 On Tue, Feb 24, 2015 at 10:54 PM, Chris Angelico wrote: > On Wed, Feb 25, 2015 at 4:46 PM, Marko Rauhamaa wrote: >> Marcos Almeida Azevedo : >> >>> Synchronized methods in Java really makes programming life simpler. >>> But I think it is standard practice to avoid this if there is a >>> lighter alternative as synchronized methods are slow. Worse case I >>> used double checked locking. >> >> I have yet to see code whose performance suffers from too much locking. >> However, I have seen plenty of code that suffers from anomalies caused >> by incorrect locking. > > Uhh, I have seen *heaps* of code whose performance suffers from too > much locking. At the coarsest and least intelligent level, a database > program that couldn't handle concurrency at all, so I wrote an > application-level semaphore that stopped two people from running it at > once. You want to use that program? Ask the other guy to close it. > THAT is a performance problem. And there are plenty of narrower cases, > where it ends up being a transactions-per-second throughput limiter. Is the name of that database program "Microsoft Access" perchance?