Skip to content
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

Improvements in command handling #2 #486

Merged
merged 45 commits into from
Jul 19, 2024
Merged

Conversation

TalZaccai
Copy link
Contributor

@TalZaccai TalZaccai commented Jun 22, 2024

This PR is based on #476

  • Eliminate re-parsing of command tokens by accessing parseState in RespServerSession
    • BasicCommands
    • AdminCommands
    • CustomRespCommands
    • InfoCommand
    • RespLatencyCommand
    • ArrayCommands
    • BitmapCommands
    • HyperLogLogCommands
    • KeyAdminCommands
    • HashCommands
    • ListCommands
    • SetCommands
    • SharedObjectCommands
    • SortedSetCommands
    • SortedSetGeoCommands
    • PubSubCommands
    • TxnRespCommands
  • Refactor ProcessAdminCommands

To-do in a consecutive PR:

  • Introduce ObjectInput struct to simplify object command execution
  • Eliminate re-parsing of command tokens in the object implementation
  • Relay parseState to transaction / custom command execution (eliminate GetNextArg)

Benchmark results:
main:

Method Job EnvironmentVariables Runtime Mean Error StdDev Allocated
InlinePing .NET 6 Empty .NET 6.0 1.425 us 0.0247 us 0.0231 us -
Set .NET 6 Empty .NET 6.0 13.283 us 0.1302 us 0.1218 us -
SetEx .NET 6 Empty .NET 6.0 18.150 us 0.1187 us 0.1110 us -
Get .NET 6 Empty .NET 6.0 7.601 us 0.0404 us 0.0378 us -
ZAddRem .NET 6 Empty .NET 6.0 76.260 us 0.8081 us 0.7559 us 23552 B
LPushPop .NET 6 Empty .NET 6.0 6.900 us 0.0280 us 0.0262 us 1208 B
SAddRem .NET 6 Empty .NET 6.0 63.656 us 0.4378 us 0.3881 us 16384 B
HSetDel .NET 6 Empty .NET 6.0 82.640 us 1.0457 us 0.9270 us 55297 B
InlinePing .NET 8 DOTNET_TieredPGO=0 .NET 8.0 1.346 us 0.0197 us 0.0312 us -
Set .NET 8 DOTNET_TieredPGO=0 .NET 8.0 9.172 us 0.0518 us 0.0459 us -
SetEx .NET 8 DOTNET_TieredPGO=0 .NET 8.0 13.215 us 0.2607 us 0.2677 us -
Get .NET 8 DOTNET_TieredPGO=0 .NET 8.0 6.277 us 0.0388 us 0.0344 us -
ZAddRem .NET 8 DOTNET_TieredPGO=0 .NET 8.0 62.530 us 0.5443 us 0.5091 us 23552 B
LPushPop .NET 8 DOTNET_TieredPGO=0 .NET 8.0 6.425 us 0.0356 us 0.0316 us 1208 B
SAddRem .NET 8 DOTNET_TieredPGO=0 .NET 8.0 51.035 us 0.4144 us 0.3876 us 16384 B
HSetDel .NET 8 DOTNET_TieredPGO=0 .NET 8.0 69.773 us 1.0519 us 0.9839 us 55297 B

Current branch:

Method Job EnvironmentVariables Runtime Mean Error StdDev Allocated
InlinePing .NET 6 Empty .NET 6.0 1.455 us 0.0222 us 0.0208 us -
Set .NET 6 Empty .NET 6.0 13.297 us 0.1195 us 0.1118 us -
SetEx .NET 6 Empty .NET 6.0 17.997 us 0.1040 us 0.0973 us -
Get .NET 6 Empty .NET 6.0 7.542 us 0.0452 us 0.0423 us -
ZAddRem .NET 6 Empty .NET 6.0 75.908 us 1.1988 us 1.0010 us 23552 B
LPushPop .NET 6 Empty .NET 6.0 6.946 us 0.0703 us 0.0587 us 1208 B
SAddRem .NET 6 Empty .NET 6.0 62.713 us 0.8867 us 0.7861 us 16384 B
HSetDel .NET 6 Empty .NET 6.0 84.752 us 1.2541 us 1.1117 us 55297 B
InlinePing .NET 8 DOTNET_TieredPGO=0 .NET 8.0 1.381 us 0.0112 us 0.0105 us -
Set .NET 8 DOTNET_TieredPGO=0 .NET 8.0 9.114 us 0.1059 us 0.0990 us -
SetEx .NET 8 DOTNET_TieredPGO=0 .NET 8.0 12.934 us 0.1139 us 0.0889 us -
Get .NET 8 DOTNET_TieredPGO=0 .NET 8.0 5.604 us 0.0530 us 0.0495 us -
ZAddRem .NET 8 DOTNET_TieredPGO=0 .NET 8.0 61.009 us 0.4549 us 0.4255 us 23552 B
LPushPop .NET 8 DOTNET_TieredPGO=0 .NET 8.0 6.448 us 0.0320 us 0.0299 us 1208 B
SAddRem .NET 8 DOTNET_TieredPGO=0 .NET 8.0 50.481 us 0.4520 us 0.4228 us 16384 B
HSetDel .NET 8 DOTNET_TieredPGO=0 .NET 8.0 67.759 us 0.7687 us 0.6815 us 55297 B

@TalZaccai TalZaccai marked this pull request as ready for review July 15, 2024 21:33
@TalZaccai TalZaccai mentioned this pull request Jul 17, 2024
12 tasks
@TalZaccai TalZaccai merged commit 35d99dd into main Jul 19, 2024
26 checks passed
@TalZaccai TalZaccai deleted the talzacc/cmd_handling_impr branch July 19, 2024 21:42
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants