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/2012-July/120982.html below:

[Python-Dev] io.BytesIO slower than monkey-patching io.RawIOBase

[Python-Dev] io.BytesIO slower than monkey-patching io.RawIOBase [Python-Dev] io.BytesIO slower than monkey-patching io.RawIOBaseJohn O'Connor jxo6948 at rit.edu
Tue Jul 17 06:57:04 CEST 2012
>
> The second approach is consistently 10-20% faster than the first one
> (depending on input) for trunk Python 3.3
>

I think the difference is that StringIO spends extra time reallocating
memory during the write loop as it grows, whereas bytes.join computes
the allocation size first since it already knows the final length.
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