[Python-Dev] optimization required: .format() is much slower than % (original) (raw)
Christian Heimes lists at cheimes.de
Tue May 27 20:05:19 CEST 2008
- Previous message: [Python-Dev] optimization required: .format() is much slower than %
- Next message: [Python-Dev] optimization required: .format() is much slower than %
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Antoine Pitrou schrieb:
In order to avoid memory consumption issues there could be a centralized cache as for regular expressions. It makes it easier to handle eviction based on various parameters, and it saves a few bytes for string objects which are never used as a formatting template.
Good idea! I suggest you hook into the string interning code and use a similar approach.
Christian
- Previous message: [Python-Dev] optimization required: .format() is much slower than %
- Next message: [Python-Dev] optimization required: .format() is much slower than %
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]