JDK-8314571 : GrowableArray should move its old data and not copy it
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-08-18
  • Updated: 2024-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Right now GrowableArray  by default calls E's copy constructor when the backing array is resized and moved. This is unnecessary, it should instead explicitly call the move constructor. The advantage of this is that NONCOPYABLE classes can now be stored by the GrowableArray.
Comments
"... NONCOPYABLE classes can now be stored by the GrowableArray. " - That's really only true if the class is moveable, which is not the default. And since we don't presently permit the use of rvalues in HotSpot code, there's not much in the moveable but not copyable bucket right now.
25-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15344 Date: 2023-08-18 10:39:28 +0000
18-08-2023