http://codereview.chromium.org/248031/diff/3001/3002
File src/api.cc (right):

http://codereview.chromium.org/248031/diff/3001/3002#newcode2448
Line 2448: // TODO(antonm): consider some fancier ways (like Duff's).
Technically, yes -- call it something Duff's-device-like then.  Another
possibility I discussed with Erik was reading two chars at a time and
using binary operations to construct a whole word at a time to write
into the target buffer.

http://codereview.chromium.org/248031/diff/3001/3002#newcode2478
Line 2478: bool copy_eos = end < length;
Shouldn't you always copy_eos at this level?  In the functions above you
transfer characters from 0 to end-1 for end<=length, and the eos is at
position |length|.

Nit: copy_eos is a misleading name because the eos isn't copied.

http://codereview.chromium.org/248031/diff/3001/3002#newcode2483
Line 2483: switch (shape.representation_tag()) {
This could probably be simplified considerably using
String::Is{Ascii,TwoByte}Representation, String::To{Ascii,UC16}Vector
and String::IsFlat though it's unclear how that would affect
performance.

http://codereview.chromium.org/248031/diff/3001/3002#newcode2522
Line 2522: } else if (second->length() == 1) {
What motivates this special case?

http://codereview.chromium.org/248031

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to