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

#14654: More fast utf-8 decoding (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year ago by storchaka
Modified:
11 months, 1 week ago
Reviewers:
martin
CC:
loewis, jcea, AntoinePitrou, haypo, eric.araujo, Arfrever.FTA_GMail.Com, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Objects/stringlib/codecs.h View 2 chunks +87 lines, -52 lines 0 comments Download

Messages

Total messages: 3
loewis
http://bugs.python.org/review/14654/diff/4717/16756 File Objects/stringlib/codecs.h (right): http://bugs.python.org/review/14654/diff/4717/16756#newcode51 Objects/stringlib/codecs.h:51: _p[0] = (STRINGLIB_CHAR)(value & 0xFFu); -1 on this chunk. ...
1 year ago #1
storchaka
http://bugs.python.org/review/14654/diff/4717/16756 File Objects/stringlib/codecs.h (right): http://bugs.python.org/review/14654/diff/4717/16756#newcode51 Objects/stringlib/codecs.h:51: _p[0] = (STRINGLIB_CHAR)(value & 0xFFu); On 2012/04/24 14:36:45, loewis ...
1 year ago #2
loewis
1 year ago #3
http://bugs.python.org/review/14654/diff/4717/16756
File Objects/stringlib/codecs.h (right):

http://bugs.python.org/review/14654/diff/4717/16756#newcode51
Objects/stringlib/codecs.h:51: _p[0] = (STRINGLIB_CHAR)(value & 0xFFu);
> It is affects performance.

That is not a sufficient reason alone to make a change. The change also needs to
be maintainable. This here is code bloat, for only a small gain.

> I'm not sure that the compiler can optimize here.

The compiler could very well determine that s[0], s[1], ... are already loaded
into "value", and fetch it from there instead of from the memory. So it could
generate exactly the same code that you have written manually.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7