Author cheryl.sabella
Recipients cheryl.sabella, serhiy.storchaka, terry.reedy
Date 2018-02-25.10:33:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519554800.45.0.467229070634.issue32940@psf.upfronthosting.co.za>
In-reply-to
Content
A similar regular expression version was mentioned on issue21765 and I had run some tests on it yesterday to verify.  On my system, it ran at a factor of 10x slower, so if the translate finished in 0.003, the regex took 0.03.  This was consistent for me, regardless of how big I made the document.

The reason for not using a defauldict was to keep the 'x' mappings out of the dictionary so that it wouldn't grow and take up space.  Although, I did realize yesterday that it wasn't really boundless because most values in source code would be ASCII.  Running both the version the doesn't add the 'x' mappings and the `fromkeys`, there doesn't seem to be much of a difference in time when processing the doc.
History
Date User Action Args
2018-02-25 10:33:20cheryl.sabellasetrecipients: + cheryl.sabella, terry.reedy, serhiy.storchaka
2018-02-25 10:33:20cheryl.sabellasetmessageid: <1519554800.45.0.467229070634.issue32940@psf.upfronthosting.co.za>
2018-02-25 10:33:20cheryl.sabellalinkissue32940 messages
2018-02-25 10:33:20cheryl.sabellacreate