You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested this using the JMH test cases return this; instead of the default return self; and saw very notable increase in performance (and decrease in heap allocation). I think the JVM doesn't know self will point to itself so reserves enough space for a second full builder object.
1 Use of self should be constrained to withGenerationGap.
2 Use of self vs casting should be compared (not done here)
I tested this using the JMH test cases
return this;
instead of the defaultreturn self;
and saw very notable increase in performance (and decrease in heap allocation). I think the JVM doesn't knowself
will point to itself so reserves enough space for a second full builder object.1 Use of
self
should be constrained towithGenerationGap
.2 Use of
self
vs casting should be compared (not done here)The text was updated successfully, but these errors were encountered: