Remove fromValues <was> Re: IntVector.fromValues is not optimized away ?

Paul Sandoz paul.sandoz at
Wed May 13 22:15:00 UTC 2020

> On May 13, 2020, at 12:14 PM, forax at wrote:
>> Instead the developer would need to do fromArray(species, new int[] { … }) or
>> use explicit insertion (which is kind of like a wither method)
> At some point, all vectors will be inline types so the VM will see zero.withLane(...).withLane(...) has vdefault.withfield.withfield so the JIT should be able avoid the initialization and generates a better code.

Although there is a lot in common between Vector and general inline types, a value that is an instance of Vector of N lanes for element type int will likely be treated somewhat differently by HS from a value that is an instance of some inline type with N int fields.  

I hope there will be much consolidating of the vector code with that of value types in Valhalla, esp. around identity/boxing.  But, I expect some differences to remain.

More information about the panama-dev mailing list