Skip to content

Commit

Permalink
This tiny change makes the code 10 times slower.
Browse files Browse the repository at this point in the history
  • Loading branch information
kindaro committed Sep 12, 2021
1 parent 75ab01c commit d79cd4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Main.hs
Expand Up @@ -99,7 +99,7 @@ instance KnownNat dimension ⇒ Memoizable (Vector dimension Int) where
instance {-# overlapping #-} KnownNat dimension Memoizable [Vector dimension Int] where
memoize function = \ input fromMaybe (function input) (findInTree memory input)
where
memory = trace "" buildTree (Set.fromList theBox) function
memory = buildTree (Set.fromList theBox) function

type Tree key value = Cofree (Map key) value

Expand Down

0 comments on commit d79cd4a

Please sign in to comment.