Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Issue 8304021: Improve speed of Utf8Write by always flattening the string first and (Closed)

Created:
9 years, 2 months ago by Erik Corry
Modified:
9 years, 2 months ago
Reviewers:
piscisaureus, Yang
CC:
v8-dev
Visibility:
Public.

Description

Improve speed of Utf8Write by always flattening the string first and detecting the ASCII case. Also rewrite Utf8Length to work on an unflattened string. Bug: http://code.google.com/p/v8/issues/detail?id=1665 Committed: http://code.google.com/p/v8/source/detail?r=9661

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -30 lines) Patch
M src/api.cc View 1 1 chunk +14 lines, -2 lines 0 comments Download
M src/objects.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 chunks +67 lines, -18 lines 0 comments Download
M test/cctest/test-api.cc View 1 3 chunks +63 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
9 years, 2 months ago (2011-10-15 08:51:52 UTC) #1
Yang
LGTM with comments. http://codereview.chromium.org/8304021/diff/1/src/api.cc File src/api.cc (right): http://codereview.chromium.org/8304021/diff/1/src/api.cc#newcode3638 src/api.cc:3638: if (str->IsAsciiRepresentation()) { IsAsciiRepresentation() is not ...
9 years, 2 months ago (2011-10-17 09:40:51 UTC) #2
Erik Corry
Added more tests, which also caught a bug! http://codereview.chromium.org/8304021/diff/1/src/api.cc File src/api.cc (right): http://codereview.chromium.org/8304021/diff/1/src/api.cc#newcode3638 src/api.cc:3638: if ...
9 years, 2 months ago (2011-10-17 12:39:09 UTC) #3
piscisaureus
9 years, 2 months ago (2011-10-21 02:05:35 UTC) #4
This change is great for node.

On our http_simple benchmark with 1mb sized responses throughput jumped from
0.005 gbit/s to 0.547 gbit/s.

Btw, we create this response body by adding characters one by one. See
https://github.com/joyent/node/blob/95d530f2b4faa57662d3b052e7637246b6a7025f/...

Powered by Google App Engine
This is Rietveld 408576698