-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Efficient SMatrix SubArrays #17
Comments
Please do fix this in Base. Thanks for noticing this! |
Oh dear... |
In fact, it's an easy enough mistake to make that I think the compiler should probably treat all field-less types as |
For now @tkoolen, have you considered using a |
Thanks. I'm not in a hurry, so I'd prefer to have this be fixed in Base rather than hack around it. I'll submit a PR to Base once I'm done running tests. |
Fixed in base. |
Nice work! Thanks |
* remove createinstance * Make skipping constructor opt in
Maybe this is an issue for Base, but I thought I'd get your input first.
I have an application where I know the maximum size of a matrix at compile time, but the number of columns is only known at runtime. I was hoping that combining
SMatrix
andview
would solve this problem. Making aview
of anSMatrix
works fine (awesome!), but there's a performance issue.Consider the following code:
So currently, I have to choose between a
LinearFast
view that is notisbits
(resulting in lots of allocations down the line), or aLinearSlow
view that is.The only reason the colon version is not
isbits
seems to be thatColon
is atype
, instead of beingimmutable
. So would it be possible to change that in Base without breaking things? Or should this be handled in StaticArrays instead?The text was updated successfully, but these errors were encountered: