bj0
12/12/2023, 8:11 PMMemoizedDeepRecursiveFunction
just to test it out but it is running incredibly slow. I suspect something is wrong (maybe a bug?). If i use DeepRecursiveFunction
and manually cache it in a Map
, the solution runs in ~ 400ms
, but if i swap that out with MDRF, and the runtime jumps up to around 20 minutes. Here is my usage: https://github.com/bj0/aoc-kotlin/blob/main/src/year2023/day12.kt#L122Youssef Shoaib [MOD]
12/12/2023, 9:25 PMbj0
12/12/2023, 9:40 PMbj0
12/12/2023, 9:44 PMbj0
12/12/2023, 9:58 PMYoussef Shoaib [MOD]
12/12/2023, 10:12 PMbj0
12/12/2023, 10:14 PMYoussef Shoaib [MOD]
12/13/2023, 12:07 AMbj0
12/13/2023, 5:57 AMAlejandro Serrano.Mena
12/13/2023, 8:50 AMAlejandro Serrano.Mena
12/13/2023, 8:50 AMConcurrentHashMap
instead of an Atomic<Map<...>>
and get quite some benefitsAlejandro Serrano.Mena
12/13/2023, 8:51 AMbj0
12/13/2023, 3:41 PM