On Sat, 18 Aug 2012 17:17:14 -0400, Terry Reedy <tjre...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com