Will it be worthy to add some public static final empty arrays for some most used types in some place in java.base, other than create them multi times in several places?
Xeno Amess
xenoamess at gmail.com
Sat Oct 9 20:00:53 UTC 2021
sigh.
quite some good things I always want are at valhalla
<https://openjdk.java.net/projects/valhalla/>, but I just don't think they
will come stable soon.
hope me be wrong.
Pavel Rappo <pavel.rappo at oracle.com> 于2021年10月10日周日 上午1:54写道:
> Empty? As in arrays of length zero?
>
> There ought to be a much better solution. I'm neither an expert nor
> (sadly) an active follower of the Valhalla project [1]. Perhaps something
> there or in Frozen Arrays [2] will address the runtime cost of creating
> zero-length arrays much more elegantly.
>
> [1] https://openjdk.java.net/projects/valhalla/
> [2] https://openjdk.java.net/jeps/8261007
>
> -Pavel
>
> > On 9 Oct 2021, at 18:19, Xeno Amess <xenoamess at gmail.com> wrote:
> >
> > I suggest putting them in Arrays btw.
>
>
More information about the core-libs-dev
mailing list