Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'string.': 0.05; 'string': 0.09; 'width': 0.09; 'translation': 0.12; 'enlighten': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'personally,': 0.16; 'really?': 0.16; 'terribly': 0.16; 'unicode.': 0.16; 'width,': 0.16; 'wrote:': 0.18; 'variable': 0.18; "python's": 0.19; 'thu,': 0.19; 'byte': 0.24; 'sorry,': 0.24; 'unicode': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'michael': 0.29; 'am,': 0.29; 'characters': 0.30; 'compared': 0.30; 'message-id:@mail.gmail.com': 0.30; '25,': 0.31; 'this.': 0.32; 'beginning': 0.33; 'received:google.com': 0.35; 'accessing': 0.36; 'surely': 0.36; 'done': 0.36; 'starting': 0.37; 'minimum': 0.38; 'to:addr:python-list': 0.38; 'though,': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'email addr:gmail.com': 0.63; 'term': 0.63; 'within': 0.65; 'positions': 0.67; 'jul': 0.74; 'goal': 0.75; 'why?': 0.91; '2013': 0.98 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:to :content-type; bh=Gtxm302zD9os3OsaLQv26Gf3Pgowz/69y/3gpqo53r4=; b=Iik9qxVWlB4k5L/qKXW99pDMJOY2BAq5lFVFa/8OWTqJ0gYw/44fv6qXL6TImGNFst w+E7xSVEfJ0Wu5uxhXK0SHk2XGHvjnXGjAJssoVJhgrvZE5TAjQEeEY3Z+qC11KRy9Tr IHi48Mh7925dlepZ3SNdKT82aMW0fByTspm+7X1nVQf7tJlVkruO0SVS2+GU0OoJU1/e aOSyTzWh3vCoCAFPVKsU5ZB+3iYjSMKf4da/3Pf2xBcWZUSSIZQcHof3QtQ6oiyuaI+P yDmW2xTMOLzuYMfn8wZJxsRXyP8CY4YCBf3QeIE9ZW+ZD5g2miM2J3oqJHUfbD5sAzBq Giyw== MIME-Version: 1.0 X-Received: by 10.59.9.69 with SMTP id dq5mr14094638ved.87.1374677787675; Wed, 24 Jul 2013 07:56:27 -0700 (PDT) In-Reply-To: <51EFE908.6080503@gmail.com> References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51EFE908.6080503@gmail.com> Date: Thu, 25 Jul 2013 00:56:27 +1000 Subject: Re: RE Module Performance From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374678213 news.xs4all.nl 15954 [2001:888:2000:d::a6]:54349 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51141 On Thu, Jul 25, 2013 at 12:47 AM, Michael Torrie wrote: > On 07/24/2013 07:40 AM, wxjmfauth@gmail.com wrote: >> Sorry, you are not understanding Unicode. What is a Unicode >> Transformation Format (UTF), what is the goal of a UTF and >> why it is important for an implementation to work with a UTF. > > Really? Enlighten me. > > Personally, I would never use UTF as a representation *in memory* for a > unicode string if it were up to me. Why? Because UTF characters are > not uniform in byte width so accessing positions within the string is > terribly slow and has to always be done by starting at the beginning of > the string. That's at minimum O(n) compared to FSR's O(1). Surely you > understand this. Do you dispute this fact? Take care here; UTF is a general term for Unicode Translation Formats, of which one (UTF-32) is fixed-width. Every other UTF-n is variable width, though, so your point still stands. UTF-32 is the basis for Python's FSR. ChrisA