[Python-Dev] Optimized string concatenation

Batista, Facundo FBatista at uniFON.com.ar
Tue Aug 3 15:08:53 CEST 2004


[Armin Rigo]

#- s = ''
#- for x in y:
#-   s += some_string(x)
#- 
#- This leaves open the policy questions:
#- 
#- * first, is that an implementation detail or a published feature?

Depending on how much slower (if still) is now this idiom against...

  l = [some_string(x) for x in y]
  s = ''.join(l)

...maybe we should stop concatenating strings. One or two points of the FAQs
should be reviewed, but only after a speed comparison.

.	Facundo





. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
ADVERTENCIA  

La información contenida en este mensaje y cualquier archivo anexo al mismo,
son para uso exclusivo del destinatario y pueden contener información
confidencial o propietaria, cuya divulgación es sancionada por la ley. 

Si Ud. No es uno de los destinatarios consignados o la persona responsable
de hacer llegar este mensaje a los destinatarios consignados, no está
autorizado a divulgar, copiar, distribuir o retener información (o parte de
ella) contenida en este mensaje. Por favor notifíquenos respondiendo al
remitente, borre el mensaje original y borre las copias (impresas o grabadas
en cualquier medio magnético) que pueda haber realizado del mismo. 

Todas las opiniones contenidas en este mail son propias del autor del
mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones
Personales S.A. o alguna empresa asociada. 

Los mensajes electrónicos pueden ser alterados, motivo por el cual
Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación
cualquiera sea el resultante de este mensaje. 

Muchas Gracias.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: [Python-Dev] Optimized string concatenation

	
  • Next message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python compile.c, 2.311, 2.312
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  • More information about the Python-Dev mailing list

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant