On Sat, 18 Aug 2012 17:17:14 -0400, Terry Reedy <tjreedy at udel.edu> wrote: > print(timeit("a.encode()", "a = 'a'*1000")) > # 1.5 in 3.2, .26 in 3.3 > > print(timeit("a.encode(encoding='utf-8')", "a = 'a'*1000")) > # 1.7 in 3.2, .51 in 3.3 > > This is one of the 3.3 improvements. But since the results are equal: > ('a'*1000).encode() == ('a'*1000).encode(encoding='utf-8') > and 3.3 should know that for an all-ascii string, I do not see why > adding the parameter should double the the time. Another issue or known > and un-fixable? At one point there was an issue with certain spellings taking a fast path (avoiding a codec lookup?) and other spellings not. I thought we'd fixed that, but perhaps we didn't? --David
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4