Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'essentially': 0.04; 'utf-8': 0.07; 'string': 0.09; 'python': 0.11; 'commented': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'hint:': 0.16; 'internally': 0.16; 'non-ascii': 0.16; 'punish': 0.16; 'wrote:': 0.18; '(not': 0.18; 'coding': 0.22; 'header:User- Agent:1': 0.23; 'unicode': 0.24; 'certain': 0.27; 'header:In- Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'character': 0.29; 'that.': 0.31; '>>>>': 0.31; 'explained': 0.31; 'this.': 0.32; 'maybe': 0.34; 'could': 0.34; 'but': 0.35; 'should': 0.36; 'searching': 0.37; 'represent': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; '8bit%:6': 0.40; 'how': 0.40; 'lost': 0.61; 'email addr:gmail.com': 0.63; 'charset:windows-1252': 0.65 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Fri, 26 Jul 2013 20:05:03 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: RE Module Performance References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51f14395$0$29971$c3e8da3$5496439d@news.astraweb.com> <51f15e03$0$29971$c3e8da3$5496439d@news.astraweb.com> <8203e802-9dc5-44c5-9547-6e1947ee224b@googlegroups.com> In-Reply-To: <8203e802-9dc5-44c5-9547-6e1947ee224b@googlegroups.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374890711 news.xs4all.nl 15864 [2001:888:2000:d::a6]:33616 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51328 On 07/26/2013 07:21 AM, wxjmfauth@gmail.com wrote: >>>> sys.getsizeof('––') - sys.getsizeof('–') > > I have already explained / commented this. Maybe it got lost in translation, but I don't understand your point with that. > Hint: To understand Unicode (and every coding scheme), you should > understand "utf". The how and the *why*. Hmm, so if python used utf-8 internally to represent unicode strings would not that punish *all* users (not just non-ascii users) since searching a string for a certain character position requires an O(n) operation? UTF-32 I could see (and indeed that's essentially what FSR uses when necessary does it not?), but not utf-8 or utf-16.