[SYSTEMDS-3481] FrameFromMatrix Improvements #1755
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit update the change of matrix to frame to more efficiently change the MatrixBlock to frames.
The previous implementation has nice cache blocks and allocation for direct double to double change, this PR simply adds support for this change in the case of changing into other types, like boolean.
Changing a Matrix 64kx2k to boolean frame:
After:
22/12/21 19:56:11 ERROR frame.FrameFromMatrixBlockTest: 1055.994364
22/12/21 19:56:12 ERROR frame.FrameFromMatrixBlockTest: 1039.756463
22/12/21 19:56:13 ERROR frame.FrameFromMatrixBlockTest: 946.029085
22/12/21 19:56:14 ERROR frame.FrameFromMatrixBlockTest: 928.161053
22/12/21 19:56:15 ERROR frame.FrameFromMatrixBlockTest: 943.132151
22/12/21 19:56:16 ERROR frame.FrameFromMatrixBlockTest: 950.212744
22/12/21 19:56:17 ERROR frame.FrameFromMatrixBlockTest: 964.515222
22/12/21 19:56:17 ERROR frame.FrameFromMatrixBlockTest: 966.944032
22/12/21 19:56:18 ERROR frame.FrameFromMatrixBlockTest: 965.85695
22/12/21 19:56:19 ERROR frame.FrameFromMatrixBlockTest: 956.783357
Before:
22/12/21 19:59:56 ERROR frame.FrameFromMatrixBlockTest: 2199.846241
22/12/21 19:59:58 ERROR frame.FrameFromMatrixBlockTest: 2373.381971
22/12/21 20:00:01 ERROR frame.FrameFromMatrixBlockTest: 2270.362306
22/12/21 20:00:03 ERROR frame.FrameFromMatrixBlockTest: 2324.07255
22/12/21 20:00:05 ERROR frame.FrameFromMatrixBlockTest: 2294.39046
22/12/21 20:00:08 ERROR frame.FrameFromMatrixBlockTest: 2284.978142
22/12/21 20:00:10 ERROR frame.FrameFromMatrixBlockTest: 2295.71655
22/12/21 20:00:12 ERROR frame.FrameFromMatrixBlockTest: 2297.712022
22/12/21 20:00:14 ERROR frame.FrameFromMatrixBlockTest: 2311.518135
22/12/21 20:00:17 ERROR frame.FrameFromMatrixBlockTest: 2467.055097