-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement response heading parsing in rust (#54)
## Motivation / Description There was nothing else to optimize in python, but Rust can parse the string and build a ResponseFlags object in 22-50ns depending on the number of flags. While the interface between rust and python will never reach ns performance, it helps indeed finding the header in the response buffer. Initial (before all optimizations): multithreaded: Overall: 110779.55 RPS / 9.03 us/req singlethreaded: Overall: 111545.63 RPS / 8.96 us/req Python optimized: multithreaded: Overall: 193340.40 RPS / 5.17 us/req singlethreaded: Overall: 193036.56 RPS / 5.18 us/req Using rust for header parsing: multithreaded: Overall: 245898.34 RPS / 4.07 us/req singlethreaded: Overall: 246165.19 RPS / 4.06 us/req
- Loading branch information
Showing
14 changed files
with
301 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
Miss, | ||
NotStored, | ||
ServerVersion, | ||
ResponseFlags, | ||
SetMode, | ||
Success, | ||
TokenFlag, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.