C++: Make write{Struct,Field}Begin take "name" as a const char*.
authorDavid Reiss <dreiss@apache.org>
Tue, 29 Apr 2008 23:12:24 +0000 (23:12 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 29 Apr 2008 23:12:24 +0000 (23:12 +0000)
commit64120001437477569524be5cfc1f5054b27ee807
tree8efc3e3b991173c848e2332fa4b04890bd920191
parent74672b6719903332c0b5969fa0bffd12c13cf121
C++: Make write{Struct,Field}Begin take "name" as a const char*.

Summary:
These methods previously took name as a const string&.  While that way
is more idiomatic, it requires a temporary string to be constructed
when we pass a string literal (which is always).  This was significantly
slowing down the serialization of field-heavy structures.  This change
will break ABI compatibility, but the serialization speed boost with
no external API changes is too important to pass up.

Reviewed By: mcslee, aditya

Test Plan: make check

TracCamp Project: Thrift

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665672 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/protocol/TBinaryProtocol.cpp
lib/cpp/src/protocol/TBinaryProtocol.h
lib/cpp/src/protocol/TDebugProtocol.cpp
lib/cpp/src/protocol/TDebugProtocol.h
lib/cpp/src/protocol/TDenseProtocol.cpp
lib/cpp/src/protocol/TDenseProtocol.h
lib/cpp/src/protocol/TJSONProtocol.cpp
lib/cpp/src/protocol/TJSONProtocol.h
lib/cpp/src/protocol/TOneWayProtocol.h
lib/cpp/src/protocol/TProtocol.h
lib/cpp/src/protocol/TProtocolTap.h