Opened 7 years ago
Last modified 5 years ago
#2919 closed enhancement
Packed storage matrix type — at Initial Version
Reported by: | bburlacu | Owned by: | bburlacu |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.16 |
Component: | Data | Version: | trunk |
Keywords: | merged | Cc: |
Description
Dense, fixed-size, symmetric matrices are pretty common. In HeuristicLab they are used for for storing similarities where for example we have code like this:
if (IsCommutative) { Parallel.For(0, individuals.Count, parallelOptions, i => { for (int j = i; j < individuals.Count; j++) { similarityMatrix[i][j] = similarityMatrix[j][i] = CalculateSolutionSimilarity(individuals[i], individuals[j]); } }); }
This data could be more compactly stored by using a packed storage scheme (https://en.wikipedia.org/wiki/Packed_storage_matrix) leading to significant savings when storing experiments where each run contains similarity matrices (genotype, phenotype).
Advantages:
- compact storage
- more efficient parallelization along the length of the storage array (as opposed to the snipped above where each thread does a different amount of work)
Disadvantages:
- packed storage prevents vectorization in case of indexed access, which might lead to worse performance (compared to a regular matrix)
Note: See
TracTickets for help on using
tickets.