You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my latest project I wanted to test out SmallUnliftedArray.
I wanted to use it with arbitrary a's however (rather than only those for which a user provides a PrimUnlifted instance),
so I wrote the following interop between Data.Elevator.Strict (from the data-elevator package) and SmallUnliftedArray, called StrictSmallArray:
Notice how not only the 'thunk check' and the indirect jump disappeared, but also all the 'store registers to/restore registers from the stack' code! Huge success!
If you want, we could include StrictSmallArray into Contiguous. Note that data-elevator itself is a tiny library with no dependencies (besides base).
Or if you'd rather not, I might publish this in a separate library.
The text was updated successfully, but these errors were encountered:
For my latest project I wanted to test out
SmallUnliftedArray
.I wanted to use it with arbitrary
a
's however (rather than only those for which a user provides aPrimUnlifted
instance),so I wrote the following interop between
Data.Elevator.Strict
(from the data-elevator package) andSmallUnliftedArray
, calledStrictSmallArray
:(NOTE: This of course depends on PR #64 )
I recommend looking at the generated Cmm comparing the following two:
The lazy one looks like:
And the strict one looks like:
Notice how not only the 'thunk check' and the indirect jump disappeared, but also all the 'store registers to/restore registers from the stack' code! Huge success!
If you want, we could include
StrictSmallArray
intoContiguous
. Note thatdata-elevator
itself is a tiny library with no dependencies (besides base).Or if you'd rather not, I might publish this in a separate library.
The text was updated successfully, but these errors were encountered: