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/2000-February/002321.html below:

how to build strings from lots of slices?

[Python-Dev] RFD: how to build strings from lots of slices?Guido van Rossum guido@python.org
Sun, 27 Feb 2000 10:40:09 -0500
> The general approach is "cords" (in Hans Boehm's GC, garbage-collected),
> and "ropes" (in SGI's STL, http://www.sgi.com/Technology/STL/Rope.html,
> reference-counted).
> 
> It's a great idea, IMO.  Why create and copy strings all the time?

Each of these "improvements" slows things down in the common case.

Believe me, I thought about this a lot when I designed Python's string
object.  ABC had an extremely complicated string implementation that
used tricks like this and was proven to be asymptotically optimal.
Unfortunately, the constant factor was large, and it was very slow for
typical string ops.

KISS, folks!

--Guido van Rossum (home page: http://www.python.org/~guido/)



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