Re: RFR: 8335701: Make GrowableArray templated by an Index [v2]

2024-07-26 Thread Johan Sjölen
On Thu, 4 Jul 2024 13:35:36 GMT, Johan Sjölen wrote: >> Hi, >> >> Today the GrowableArray has a set index type of `int`, this PR makes it so >> that you can set your own index type through a template parameter. >> >> This opens up for a few new design choices: >> >> - Do you know that you hav

Re: RFR: 8335701: Make GrowableArray templated by an Index [v2]

2024-07-26 Thread Johan Sjölen
On Thu, 4 Jul 2024 14:07:57 GMT, Thomas Stuefe wrote: > If this is for src/hotspot/share/nmt/arrayWithFreeList.hpp, would it not be a > lot simpler to just implement it there, and give it another backing store? > > In particular because after doing all this work it still won't even support > t

Re: RFR: 8335701: Make GrowableArray templated by an Index [v2]

2024-07-26 Thread Thomas Stuefe
On Thu, 4 Jul 2024 13:35:36 GMT, Johan Sjölen wrote: >> Hi, >> >> Today the GrowableArray has a set index type of `int`, this PR makes it so >> that you can set your own index type through a template parameter. >> >> This opens up for a few new design choices: >> >> - Do you know that you hav

Re: RFR: 8335701: Make GrowableArray templated by an Index [v2]

2024-07-04 Thread Johan Sjölen
On Thu, 4 Jul 2024 13:35:36 GMT, Johan Sjölen wrote: >> Hi, >> >> Today the GrowableArray has a set index type of `int`, this PR makes it so >> that you can set your own index type through a template parameter. >> >> This opens up for a few new design choices: >> >> - Do you know that you hav

Re: RFR: 8335701: Make GrowableArray templated by an Index [v2]

2024-07-04 Thread Johan Sjölen
> Hi, > > Today the GrowableArray has a set index type of `int`, this PR makes it so > that you can set your own index type through a template parameter. > > This opens up for a few new design choices: > > - Do you know that you have a very small array? Use an `uint8_t` for len and > cap, each