facebook / fbthrift

Facebook's branch of Apache Thrift, including a new C++ server.
Apache License 2.0
2.55k stars 608 forks source link

Remove two hot loads in readXXXBegin. #527

Closed nadavrot closed 1 year ago

nadavrot commented 1 year ago

Summary: Remove one or two hot loads in readXXXBegin. In the 'likely' (else) side of the IF the two return values are unused. By duplicating and sinking the code we allow the compiler to inline into the hot path and eliminate the two hot loads.

Reviewed By: LoganEvans

Differential Revision: D39599564

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D39599564

facebook-github-bot commented 1 year ago

This pull request has been reverted by 2895628685b0ed044263474b009f6e79ff7a9992.