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

#25399: Optimize bytearray % args

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years ago by victor.stinner
Modified:
2 years ago
Reviewers:
CC:
haypo, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Include/bytesobject.h View 2 chunks +10 lines, -2 lines 2 comments Download
Objects/bytearrayobject.c View 1 chunk +5 lines, -17 lines 0 comments Download
Objects/bytesobject.c View 14 chunks +84 lines, -39 lines 3 comments Download

Messages

Total messages: 1
haypo
2 years ago #1
http://bugs.python.org/review/25399/diff/15761/Include/bytesobject.h
File Include/bytesobject.h (right):

http://bugs.python.org/review/25399/diff/15761/Include/bytesobject.h#newcode135
Include/bytesobject.h:135: /* bytes object */
bytes or bytearray

http://bugs.python.org/review/25399/diff/15761/Include/bytesobject.h#newcode164
Include/bytesobject.h:164: Return a bytes object.
Return a bytes object, or a bytearray object if use_bytearray is non-zero.

http://bugs.python.org/review/25399/diff/15761/Objects/bytesobject.c
File Objects/bytesobject.c (right):

http://bugs.python.org/review/25399/diff/15761/Objects/bytesobject.c#newcode622
Objects/bytesobject.c:622: }
{ and } can be removed

http://bugs.python.org/review/25399/diff/15761/Objects/bytesobject.c#newcode3241
Objects/bytesobject.c:3241: Py_RETURN_NOTIMPLEMENTED;
This code doesn't make sense and must be removed. The two checks below are
better.

http://bugs.python.org/review/25399/diff/15761/Objects/bytesobject.c#newcode3869
Objects/bytesobject.c:3869: writer->use_small_buffer = 0;
these initialization can be replaced with:

memset(writer, 0, offsetof(writer->small_buffer));
Sign in to reply to this message.

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