GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] optimization required: .format() is much slower than %

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

Gregory P. Smith greg at krypto.org
Tue May 27 18:38:24 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 ]

On Tue, May 27, 2008 at 3:12 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>>
>> The only optimisation idea I came up with (other than the addition of a
>> tp_format slot) is for string objects to be able to cache their
>> (lookup:subformat) pairs rather than having to parse themselves every
>> time. That has obvious memory consumption implications though.
>
> If a string is used as a formatting template, it is bound to be used again as
> such. So IMHO it sounds quite reasonable.
>
> 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.
>
> Regards
>
> Antoine.

+1 to that idea.

  • 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 ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.