[vector] Vector API -- alignment with value types

Brian Goetz brian.goetz at oracle.com
Mon Jan 28 22:41:39 UTC 2019



On 1/25/2019 7:14 PM, Vladimir Ivanov wrote:
>> Part I
>> ------
>>
>> Here's an idea for simplifying Species, which is: let's drive Species 
>> down to be a simple class that is really just a constant holder for 
>> (element type, shape), and move all the behavior to static methods on 
>> XxxVector.  (At that point, Species can just be an enum, or a group 
>> of enums with a common interface parent, if we like.) 
>
> Leaving parameterized variants on Species and introducing default ones 
> (as static methods) looks more attractive to me. 

To be clear -- the end result of this is that there is almost nothing 
left in Species _at all_.  I think the Species abstraction, from an API 
perspective -- is over-engineered; it doesn't serve the _user_ very 
much, and you (currently) can't understand this API before you 
understand species.

If Species could take a back seat, being a simple value-wrapper for 
(type, lanes) -- I think that would be a worthwhile result.

There would probably be some short-term regression in 
inlining/intrinsification, but I suspect that would be a short-term 
speed bump?




More information about the panama-dev mailing list