Arrays flags or new Array class #3610
Replies: 2 comments 10 replies
-
|
Your news doesn't surprise me. Seems as though matrices end up being converted back and forth to arrays in multiple places in the code, and I guess every round trip revalidates. Maybe a DimensionedArray derived class of the built-in Array would help and be safest? Just speculating. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for bringing this up David. Makes sense that that validation takes time. Similar to passing Another idea could be to leave the validation of individual cells in the Matrix to not be an array out, I think that is the most expensive part. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
While doing benchmarks I noted that creating a matrix is expensive due to validation of rectangularity.
In some cases an array has already a known size or is know to be rectangular and maybe could be checked for size and validated for rectangularity multiple times before being converted to a Matrix.
Some ways to prevent this are:
I see the cool proposal for a notation for arrays at #3568 and even though I was waiting to express this thought until I have a better grasp on operations on jagged arrays and implementing a flat matrix (from stdlib or otherwise) maybe it's better to express this idea early.
Beta Was this translation helpful? Give feedback.
All reactions