Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3520)

#19087: bytearray front-slicing not optimized

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 6 months ago by pitrou
Modified:
5 years, 5 months ago
Reviewers:
storchaka
CC:
AntoinePitrou, haypo, devnull_psf.upfronthosting.co.za, Martin Panter, storchaka
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 2

Patch Set 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Include/bytearrayobject.h View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
Lib/test/test_bytes.py View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
Lib/test/test_sys.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
Objects/bytearrayobject.c View 1 2 38 chunks +164 lines, -146 lines 0 comments Download

Messages

Total messages: 2
storchaka_gmail.com
http://bugs.python.org/review/19087/diff/9410/Objects/bytearrayobject.c File Objects/bytearrayobject.c (right): http://bugs.python.org/review/19087/diff/9410/Objects/bytearrayobject.c#newcode366 Objects/bytearrayobject.c:366: buf = PyByteArray_AS_STRING(self); You can decrease the size of ...
5 years, 5 months ago #1
AntoinePitrou
5 years, 5 months ago #2
http://bugs.python.org/review/19087/diff/9410/Objects/bytearrayobject.c
File Objects/bytearrayobject.c (right):

http://bugs.python.org/review/19087/diff/9410/Objects/bytearrayobject.c#newco...
Objects/bytearrayobject.c:366: buf = PyByteArray_AS_STRING(self);
On 2013/09/30 22:48:14, storchaka wrote:
> You can decrease the size of your patch (and perhaps a little increase a
> performance) if ob_bytes will point not to the start of allocated data, but to
> the start of allocated data plus ob_start.

I thought about that. I don't think the performance will be significantly
different but it's true it could simplify the code a bit, so I'll try.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+