New submission from John O'Connor <[email protected]>:
bytearray() is using a less efficient implementation of split() than its
similar friends bytes and unicode.
I added a couple extra checks to return early in {bytes,unicode} split().
- if length is 0
- if left strip removed all bytes
Looking at just how similar these 3 implementations are I feel that we could
also unify/generalize them into one generic helper implementation and leave the
object marshaling up to the type specific methods.
----------
components: Interpreter Core
files: strip_perf.patch
keywords: patch
messages: 142660
nosy: benjamin.peterson, ezio.melotti, haypo, jcon, pitrou
priority: normal
severity: normal
status: open
title: Optimizations for {bytearray,bytes,unicode}.strip()
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file22982/strip_perf.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com