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

MultiplexedConnection: Remove unnecessary allocation in send. #66

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

nihohit
Copy link

@nihohit nihohit commented Nov 21, 2023

Instead of using a Vec and allocating / popping values from it,
single requests will now create only a single Value object, which will
reduce the heap usage for single requests.
This gives us a small but consistent perf improvement of about 1% for Node benchmarks, and ~5% for Rust benchmarks.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Instead of using a Vec<Value> and allocating / popping values from it,
single requests will now create only a single Value object, which will
reduce the heap usage for single requests.
@nihohit
Copy link
Author

nihohit commented Nov 21, 2023

<style> </style>
is_cluster client num_of_tasks data_size language baseline baseline-local multiplex ratio multiplex-local ratio
FALSE babushka socket 10 100 node 44987 83463.91667 47740.81818 1.061213644 84161.83333 1.008361897
FALSE babushka socket 100 100 node 125619.4545 155411.3333 127005.4545 1.011033323 156535.6667 1.007234565
FALSE babushka socket 1000 100 node 168319.0909 168156.6667 170059.9091 1.010342369 168566.5833 1.002437707
FALSE babushka 10 100 rust 53822.5 175588.5 52596 0.977212132 181523.9167 1.033802992
FALSE babushka 100 100 rust 375428.25 553940.8333 399197.25 1.063311698 604828.75 1.091865256
FALSE babushka 1000 100 rust 396085.75 456958.25 425199.75 1.073504285 491525.4167 1.075646225
TRUE babushka socket 10 100 node 37278.09091   37748.63636 1.012622574    
TRUE babushka socket 100 100 node 118927.8182   118536 0.996705412    
TRUE babushka socket 1000 100 node 140978.4545   142286.5455 1.009278658    
TRUE babushka 10 100 rust 41588   42564.75 1.023486342    
TRUE babushka 100 100 rust 248708.5   256052.5 1.029528544    
TRUE babushka 1000 100 rust 271053.25   289565.5 1.068297466    

@shachlanAmazon shachlanAmazon merged commit 6ea685c into amazon-contributing:main Nov 27, 2023
@nihohit nihohit deleted the slim-multiplexer branch November 28, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants