A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-January/031840.html below:

Slow String Repeat (was: [Python-Dev] PyBuffer* vs. array.array())

Slow String Repeat (was: [Python-Dev] PyBuffer* vs. array.array()) Slow String Repeat (was: [Python-Dev] PyBuffer* vs. array.array())Raymond Hettinger python@rcn.com
Mon, 6 Jan 2003 09:50:07 -0500
From: "Christian Tismer" <tismer@tismer.com>

> I could imagine not to change string repeat and
> others, but the abstract implementation of the
> repetition of a sequence.
> An algorithm like the above could be written
> for general sequences, and do this break-up
> on the abstract level, once and for all
> repetitions of arbitrary objects.

Something similar can be done for arraymodule.c
The use cases there may involve longer than normal
repetition counts so some attention should be paid
to cache invalidation.

In other places, there is less of an opportunity since
replication involves more than copying (there are
Py_INCREFs to worry about).


Raymond Hettinger



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