Closed metasim closed 2 years ago
We did a tiny research with @metasim: RF does a lot of upcasts to the CellGrid[Int]
type which leads to ineffective cols()
/ rows()
calls, since Grid
and CellGrid
are not specialized by Int
/ Long
. In case the Tile
is upcasted to it we loose any meta about the specialized version that allows to avoid boxing.
The solution is to add specialization by Int
and Long
to Grid
and / or CellGrid
.
Long
is needed since the whole idea of this N
was to add an ability to work with Longs
. (if I don't remember it wrong).
@pomadchin
RF does a lot of upcasts to the
CellGrid[Int]
I don't remember these.. are they explicit, and do we need to do anything about them?
@metasim nope; I think I meant just general upcasting to parent types with loosing info about specializations in children. Nothing to do about it; should be all good now! Design oversights
It is reopened, but the issue is slightly different now: specialization works, however boxing still happens. cc @metasim
Baseline Flight Recording profile.jfr.zip
Details and test case to come, but right now it appears that calls to
rows()
andcols()
box the return values.:javap
output