On Monday, March 21, 2016 at 6:04:28 PM UTC+5:30, BartC wrote: > On 21/03/2016 02:21, Terry Reedy wrote: > > On 3/20/2016 9:15 PM, BartC wrote: > >> http://pastebin.com/dtM8WnFZ > >> This is a test of a character-at-a-time task in Python; > > > > I disagree. It tests of C code re-written in ludicrously crippled > > Python. No use of the re module, > > You can't use the re module for this kind of test. It would be like a > writing a C compiler in Python like this: > > system("gcc "+filename) > > (or whatever the equivalent is in Python) and claiming the compilation > speeds are due to Python's fast byte-code.
No fair! Terry said re or dict. You answered the re and deleted the dict I would add try dict and/or flat arrays [given that your charset is ASCII and array of 127 at worst even less if you chop off unprintables is as good as nothing] [Ive see hugh speedup in C# going from dictionaries to arrays] -- https://mail.python.org/mailman/listinfo/python-list