Created
November 14, 2019 16:57
-
-
Save samth/58b9d3a6673f8c746d12199ab41bf6a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require (for-syntax racket/base)) | |
(module base racket/base | |
(provide f) | |
(define (f x) (sync x))) | |
(module r racket/base | |
(provide f) | |
(dynamic-require 'racket #f) | |
(define (f x) (sync x))) | |
(module tr racket/base | |
(provide f) | |
(dynamic-require 'typed/racket #f) | |
(define (f x) (sync x))) | |
(module p racket/base | |
(provide f) | |
(dynamic-require 'plot #f) | |
(define (f x) (sync x))) | |
(require racket/place syntax/location) | |
(module+ main | |
(collect-garbage) (collect-garbage) | |
'startup | |
(displayln (current-memory-use)) | |
'base | |
(define p1 (dynamic-place (quote-module-path ".." base) 'f)) | |
(collect-garbage) (collect-garbage) | |
(displayln (current-memory-use)) | |
'racket | |
(define p2 (dynamic-place (quote-module-path ".." r) 'f)) | |
(collect-garbage) (collect-garbage) | |
(displayln (current-memory-use)) | |
'typed/racket | |
(define p3 (dynamic-place (quote-module-path ".." tr) 'f)) | |
(collect-garbage) (collect-garbage) | |
(displayln (current-memory-use)) | |
(define p4 (dynamic-place (quote-module-path ".." p) 'f)) | |
(collect-garbage) (collect-garbage) | |
'plot | |
(displayln (current-memory-use)) | |
(list p1 p2 p3 p4) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment