Skip to content

Commit

Permalink
Merge pull request #1132 from herbie-fp/fix-derivations
Browse files Browse the repository at this point in the history
Fix derivation speed broken by #1130
  • Loading branch information
pavpanchekha authored Jan 21, 2025
2 parents bb83a5a + 064dc07 commit 84665d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/derivations.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[_ altn]))

(define (add-derivations alts)
(define cache (make-hasheq))
(define cache (make-hash))
(for/list ([altn (in-list alts)])
;; We need to cache this because we'll see the same alt several times
(alt-map (lambda (altn) (hash-ref! cache altn (lambda () (add-derivations-to altn)))) altn)))

0 comments on commit 84665d5

Please sign in to comment.