Baunsgaard commented on code in PR #1983: URL: https://github.com/apache/systemds/pull/1983#discussion_r1495091532
########## src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixFourier.java: ########## @@ -440,4 +444,18 @@ public static MatrixBlock[] ifft_linearized(MatrixBlock re, int threads) { threads); } + private static double sin(double angle){ + if (!sinCache.containsKey(angle)) { Review Comment: I think my comment was unclear. 1. You should reuse the same cached hash map every invocation. 2. The soft reference is just wrapping your allocated caches. 3. Because it takes extra time to get your cached angles (the HashMap) out of the soft reference, we need to get it out at a different location. Therefore i suggested to materialize it as a variable inside "fft_one_dim_sub", meaning taking it out of the soft reference there, or materializing a new hash map if the soft reference is empty. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@systemds.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org