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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'broken': 0.04; 'correct.': 0.07; 'preference': 0.07; '(instead': 0.09; 'integers': 0.09; 'lawrence': 0.09; 'measure': 0.09; 'optimizing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'jan': 0.12; 'mostly': 0.14; "wouldn't": 0.14; '*less*': 0.16; 'beautifully': 0.16; 'benefit.': 0.16; 'correctness': 0.16; 'identifiers': 0.16; 'immutable,': 0.16; 'incorrect': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'unicode,': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'any,': 0.19; 'normally': 0.19; 'machine': 0.22; '>>>': 0.22; 'memory': 0.22; 'programming': 0.22; 'separate': 0.22; 'header:User-Agent:1': 0.23; 'received:comcast.net': 0.24; 'possibly': 0.26; 'posts': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'correct': 0.29; 'chris': 0.29; 'am,': 0.29; 'words': 0.29; "doesn't": 0.30; 'compared': 0.30; 'statement': 0.30; "i'm": 0.30; 'code': 0.31; 'context,': 0.31; 'decimal': 0.31; 'obscure': 0.31; 'there.': 0.32; 'entirely': 0.33; 'could': 0.34; 'except': 0.35; 'something': 0.35; 'one,': 0.35; 'but': 0.35; 'really': 0.36; 'combination': 0.36; 'representing': 0.36; 'surely': 0.36; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'extremely': 0.39; 'realize': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'read': 0.60; 'around.': 0.60; 'everybody': 0.60; 'subject:"': 0.60; 'most': 0.60; 'discuss': 0.62; 'decided': 0.64; 'more': 0.64; 'taking': 0.65; 'worth': 0.66; 'capable': 0.67; 'benefit': 0.68; 'smith': 0.68; 'default': 0.69; 'wish': 0.70; 'article': 0.77; 'glad': 0.83; 'low': 0.83; 'complexity': 0.84; 'float,': 0.84; 'fortunately': 0.84; 'high,': 0.84; 'idiot': 0.84; 'pike': 0.84; 'prefers': 0.84; 'sometimes.': 0.84; 'dare': 0.91; 'doubling': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Blog "about python 3" Date: Sat, 04 Jan 2014 12:51:32 -0500 References: <52c1dc4c$0$2877$c3e8da3$76491128@news.astraweb.com> <52C1F5EC.3020808@stoneleaf.us> <52c29416$0$29987$c3e8da3$5496439d@news.astraweb.com> <52c6415c$0$29972$c3e8da3$5496439d@news.astraweb.com> <52C6AD00.5050000@chamonix.reportlab.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: c-50-133-228-126.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: 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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388857913 news.xs4all.nl 2905 [2001:888:2000:d::a6]:40268 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63138 On 1/4/14 9:17 AM, Chris Angelico wrote: > On Sun, Jan 5, 2014 at 12:55 AM, Roy Smith wrote: >> In article , >> Mark Lawrence wrote: >> >>> Surely everybody prefers fast but incorrect code in >>> preference to something that is correct but slow? >> >> I realize I'm taking this statement out of context, but yes, sometimes >> fast is more important than correct. Sometimes the other way around. > > More usually, it's sometimes better to be really fast and mostly > correct than really really slow and entirely correct. That's why we > use IEEE floating point instead of Decimal most of the time. Though > I'm glad that Python 3 now deems the default int type to be capable of > representing arbitrary integers (instead of dropping out to a separate > long type as Py2 did), I think it's possibly worth optimizing small > integers to machine words - but mainly, the int type focuses on > correctness above performance, because the cost is low compared to the > benefit. With float, the cost of arbitrary precision is extremely > high, and the benefit much lower. > > With Unicode, the cost of perfect support is normally seen to be a > doubling of internal memory usage (UTF-16 vs UCS-4). Pike and Python > decided that the cost could, instead, be a tiny measure of complexity > and actually *less* memory usage (compared to UTF-16, when lots of > identifiers are ASCII). It's a system that works only when strings are > immutable, but works beautifully there. Fortunately Pike doesn't have > any, and Python has only one, idiot like jmf who completely > misunderstands what's going on and uses microbenchmarks to prove > obscure points... and then uses nonsense to try to prove... uhh... > actually I'm not even sure what, sometimes. I wouldn't dare try to > read his posts except that my mind's already in a rather broken state, > as a combination of programming and Alice in Wonderland. > > ChrisA > I really wish we could discuss these things without baiting trolls. -- Ned Batchelder, http://nedbatchelder.com