Automatic Resource Management, V.2
Mark Thornton
mthornton at optrak.co.uk
Mon Apr 20 08:25:27 PDT 2009
Joshua Bloch wrote:
>
> I did think about this, but I opted to stick with the pattern in enum types'
> values() method. That decision was made for performance. Arguably the
> performance issues are less important here, and the winds of change have
> blown further away from arrays since then, so I'm definitely open to
> switching this to a List if others think it's the right thing to do.
>
>
Surely the VM is able to optimise away the trivial accessors in an
immutable List backed by an array, and has been capable of this for
quite a while? I really wonder if there was ever any significant
performance gain obtained from this choice. In any case I vote for a List.
Mark Thornton
More information about the coin-dev
mailing list