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

Use IntUnaryOperator / DoubleUnaryOperator in VegasLimit #211

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

kilink
Copy link
Member

@kilink kilink commented Sep 19, 2024

Switch to IntUnaryOperator and DoubleUnaryOperator in VegasLimit to avoid unnecessary boxing. Additionally, reduced repeated reads of volatile fields.

@kilink kilink force-pushed the vegas-limit-int-unary-operator branch from 20db64c to 711f387 Compare October 4, 2024 08:20
@kilink kilink force-pushed the vegas-limit-int-unary-operator branch 2 times, most recently from b5ddc17 to 3fbad85 Compare October 6, 2024 18:58
@kilink kilink requested a review from enbnt October 20, 2024 19:13

probeCount++;
if (shouldProbe()) {
LOG.debug("Probe MinRTT {}", TimeUnit.NANOSECONDS.toMicros(rtt) / 1000.0);
if (LOG.isDebugEnabled()) {
LOG.debug("Probe MinRTT {}", TimeUnit.NANOSECONDS.toMicros(rtt) / 1000.0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

rtt_noload = rtt;
return (int)estimatedLimit;
if (LOG.isDebugEnabled()) {
LOG.debug("New MinRTT {}", TimeUnit.NANOSECONDS.toMicros(rtt) / 1000.0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

Switch to IntUnaryOperator and DoubleUnaryOperator in VegasLimit to avoid unnecessary boxing.
Additionally, reduced repeated reads of volatile fields.
@kilink kilink force-pushed the vegas-limit-int-unary-operator branch from 3fbad85 to a127eb4 Compare October 24, 2024 18:20
@enbnt enbnt merged commit 414f64d into Netflix:main Oct 25, 2024
1 check passed
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.

4 participants