little question speed encondings

MRAB google at mrabarnett.plus.com
Sat Mar 14 22:36:04 CET 2009


Linos wrote:
> I know that this can be evident for most of the people but i would like 
> to know the reply and the reasoning if possible:
> 
> Should my python application have a difference in speed of execution after
> change the encoding header of the file from nothing (ascii) to latin-1 
> or utf-8?
> If yes, only when the .pyc files are created or even with .pyc or .pyo 
> files?
> 
There _might_ be a difference in the time taken to parse the .py file to
create the .pyc, but I doubt it would be significant, and it would be
done only once. It would have no effect on the speed of the resulting
.pyc file.

Recommendation: use UTF-8.



More information about the Python-list mailing list