From 7e83a6038ad5b04768baaefa2209108a3dc9d642 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 31 Dec 2018 14:16:31 -0700 Subject: [PATCH] schemify: fix pessimization of constructor applications A missing `unwrap` caused references to structure constructors to be treated as potentially non-primitive procedures, which significantly slows down calls to the constructor. Probably, this started going wrong at a point where original names were more consistently associated to defined identifier. --- racket/src/schemify/mutated.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/racket/src/schemify/mutated.rkt b/racket/src/schemify/mutated.rkt index 769e26909a..3468eb2b3b 100644 --- a/racket/src/schemify/mutated.rkt +++ b/racket/src/schemify/mutated.rkt @@ -64,8 +64,9 @@ ;; too early, the variable is now ready, so remove from ;; `mutated`: (for ([id (in-list ids)]) - (when (eq? 'not-ready (hash-ref mutated (unwrap id) #f)) - (hash-remove! mutated id)))] + (let ([id (unwrap id)]) + (when (eq? 'not-ready (hash-ref mutated id #f)) + (hash-remove! mutated id))))] [`,_ (find-mutated! form #f prim-knowns knowns imports mutated)]) knowns)