Currently there is some waste in memory consumption since the total memory of Ark increases as O(n_components x n_tables), so when you have many components and many tables even if those tables only have a few components you can have a good amount of wasted memory. This can be improved in two ways as far as I can see:
- Have one more indirection so that we pass to
O(n_components x n_archetypes)
- Have a map that for each component specifies a mapping from table id to the column
The first is less optimal for memory but faster than the second. I think that indeed the first solution should be sufficient.
Both are still slower than the current design though, so maybe one can use this layout only as an option.
Not totally sure how to proceed in general, what do you think @mlange-42?
Currently there is some waste in memory consumption since the total memory of Ark increases as
O(n_components x n_tables), so when you have many components and many tables even if those tables only have a few components you can have a good amount of wasted memory. This can be improved in two ways as far as I can see:O(n_components x n_archetypes)The first is less optimal for memory but faster than the second. I think that indeed the first solution should be sufficient.
Both are still slower than the current design though, so maybe one can use this layout only as an option.
Not totally sure how to proceed in general, what do you think @mlange-42?