A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079807.html below:

[Python-Dev] optimization required: .format() is much slower than %

[Python-Dev] optimization required: .format() is much slower than % [Python-Dev] optimization required: .format() is much slower than %Eric Smith eric+python-dev at trueblade.com
Tue May 27 20:14:35 CEST 2008
Christian Heimes wrote:
> 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.

I don't think parsing the strings is where it spends its time.  I think 
the time is spent in object creation, __format__ lookup, and building 
the result.  I'm looking into some of these other optimizations now.

More information about the Python-Dev mailing list

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