Make these definitions safe again.
As of this moment, the performance win on new-metrics.rkt for using the unsafe version is about 1% (avg over 10 runs), which isn't enough to make it worth the segfaults. I believe that changes to the JIT since 2012 (when the unsafe ops were added) have sped up struct access.
This commit is contained in:
parent
cb35383143
commit
ad0c69ea29
|
@ -362,8 +362,8 @@
|
|||
[PathElem def-pathelem #:PathElem pathelem-case print-pathelem pathelem-name-ht pathelem-rec-id])
|
||||
|
||||
;; NOTE: change these if the definitions above change, or everything will segfault
|
||||
(define-syntax-rule (unsafe-Rep-seq v) (unsafe-struct*-ref v 0))
|
||||
(define-syntax-rule (unsafe-Type-key v) (unsafe-struct*-ref v 4))
|
||||
(define-syntax-rule (unsafe-Rep-seq v) (Rep-seq v))
|
||||
(define-syntax-rule (unsafe-Type-key v) (Type-key v))
|
||||
(provide unsafe-Rep-seq unsafe-Type-key)
|
||||
|
||||
(define (Rep-values rep)
|
||||
|
|
Loading…
Reference in New Issue
Block a user