RFR: 8315585: Optimization for decimal to string [v4]
Archie Cobbs
archie.cobbs at gmail.com
Tue Feb 4 21:37:38 UTC 2025
On Tue, Feb 4, 2025 at 2:40 PM Joe Darcy <darcy at openjdk.org> wrote:
> Can we please have a pause on the sequence of "make XYZ toString faster"
> PRs until there is some wider discussion of goals, etc.? Thanks.
>
I agree with this sentiment... It was surprising to see how easily a VM
crash can sneak in.
There is always a trade-off between A and B, where:
A = Code clarity, robustness vs. future changes, friendliness to new
developers, minimizing obscure bugs (and security holes), etc...
B = Performance
Where should the line be drawn? Personally (as a Java user) I'd accept 1%
slower vs. 1% less likely to crash any day...
Performance is important but there should be some general guidelines and
maybe some specific policies. E.g. should there be a higher number of
reviews required whenever Unsafe is used purely for performance reasons?
It's also worth pondering what's implied by the Java team evangelizing to
the rest of the world to stop using Unsafe, while at the same time adding
it more and more ourselves (when not strictly required). In theory we
should instead be eating our own dog food (or better yet, improving its
quality).
Also: when does it become more appropriate to address a performance issue
in Hotspot instead of in Java source? If some optimization eliminates an
array range check that is clearly not needed, it might be feasible (and
much more widely beneficial) to teach Hotstpot how to figure that out
itself, etc.
Just some random thoughts...
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250204/116c8508/attachment.htm>
More information about the core-libs-dev
mailing list