-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++][Parquet] Thrift: generate template method to accelerate reading thrift #41702
Comments
After:
Before
It's about 20% faster here. |
pitrou
pushed a commit
that referenced
this issue
May 22, 2024
…te reading thrift (#41703) ### Rationale for this change By default, the Thrift serializer and deserializer call many virtual functions. However, the Thrift C++ compiler has an option to generate template methods that does away with the cost of calling virtual functions. It seems to make the metadata read/write benchmarks around 10% faster. ### What changes are included in this PR? 1. `cpp/build-support/update-thrift.sh`: enable `templates` option to Thirft C++ compilerargument 2. `cpp/src/parquet/thrift_internal.h`: use generated code 3. `cpp/src/generated`: update generated files. ### Are these changes tested? Covered by existing tests. ### Are there any user-facing changes? No. * GitHub Issue: #41702 Authored-by: mwish <maplewish117@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Issue resolved by pull request 41703 |
vibhatha
pushed a commit
to vibhatha/arrow
that referenced
this issue
May 25, 2024
…celerate reading thrift (apache#41703) ### Rationale for this change By default, the Thrift serializer and deserializer call many virtual functions. However, the Thrift C++ compiler has an option to generate template methods that does away with the cost of calling virtual functions. It seems to make the metadata read/write benchmarks around 10% faster. ### What changes are included in this PR? 1. `cpp/build-support/update-thrift.sh`: enable `templates` option to Thirft C++ compilerargument 2. `cpp/src/parquet/thrift_internal.h`: use generated code 3. `cpp/src/generated`: update generated files. ### Are these changes tested? Covered by existing tests. ### Are there any user-facing changes? No. * GitHub Issue: apache#41702 Authored-by: mwish <maplewish117@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the enhancement requested
thrift cpp idl enable generate template for thrift
proto
.Pro: This avoid lots of virtual function calls during deserializing.
Cons: more generated methods
Component(s)
C++, Parquet
The text was updated successfully, but these errors were encountered: