The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

MRAB python at mrabarnett.plus.com
Mon Mar 21 09:17:59 EDT 2016


On 2016-03-21 12:59, Chris Angelico wrote:
> On Mon, Mar 21, 2016 at 11:34 PM, BartC <bc at freeuk.com> wrote:
>> For Python I would have used a table of 0..255 functions, indexed by the
>> ord() code of each character. So all 52 letter codes map to the same
>> name-handling function. (No Dict is needed at this point.)
>>
>
> Once again, you forget that there are not 256 characters - there are
> 1114112. (Give or take.)
>
Strictly speaking, they're codepoints.

Only about 10% of codepoints are currently defined, and diacritics and 
the like classed aren't 'characters' as such.




More information about the Python-list mailing list