Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IPM/HSD: use logical slicing instead of elementwise multiplication
We now do basically this for a logical vector l: `dot(a[l], b[l])`, instead of `dot(a .* l, b .* l) as before. This is as suggested here: ds4dm#122 (comment) Helps with the performance of the BigFloat arithmetic. This is the output with the script from the previous commit: ``` exp = 6: 27.391877 seconds (142.35 M allocations: 21.646 GiB, 11.38% gc time, 23.70% compilation time) elapsed time (ns): 27391877044 gc time (ns): 3116697350 bytes allocated: 23242616545 pool allocs: 142136686 non-pool GC allocs: 9144 malloc() calls: 118007 realloc() calls: 88649 free() calls: 116981 minor collections: 506 full collections: 0 exp = 9: 289.050404 seconds (1.12 G allocations: 175.440 GiB, 29.73% gc time) elapsed time (ns): 289050404133 gc time (ns): 85940338982 bytes allocated: 188377360520 pool allocs: 1117528611 non-pool GC allocs: 75494 malloc() calls: 728937 realloc() calls: 554273 free() calls: 743507 minor collections: 4186 full collections: 3 ``` Fixes ds4dm#122
- Loading branch information