Skip to content

Instantly share code, notes, and snippets.

@samth
Created July 12, 2012 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samth/3098628 to your computer and use it in GitHub Desktop.
Save samth/3098628 to your computer and use it in GitHub Desktop.
strange timings
(begin
(module rlnull ....
(require (lib "racket/base.rkt")
(lib "typed/racket/base.rkt")
(for-syntax
(lib "syntax/location.rkt")
(lib "racket/base.rkt")
(lib "typed-racket/env/env-req.rkt")))
(begin
(begin-for-syntax (let () '#<void>))
(begin-for-syntax
(let ()
(|_add-mod!@(lib "typed-racket/env/env-req.rkt")|
(|_module-path-fixup@(lib "syntax/location.rkt")|
(|_variable-reference->module-source/submod@(lib "syntax/location.rkt")|
(#%variable-reference #%linkage))
'())))))
(module*
#%type-decl
....
(require (lib "typed-racket/types/numeric-tower.rkt")
(lib "typed-racket/env/type-name-env.rkt")
(lib "typed-racket/env/global-env.rkt")
(lib "typed-racket/env/type-alias-env.rkt")
(for-meta -1 "here.rkt")))))
#lang racket/base
(require (for-syntax syntax/location racket/base typed-racket/env/env-req))
(begin-for-syntax
(module* #%type-decl #f
(require typed-racket/types/numeric-tower
typed-racket/env/type-name-env
typed-racket/env/global-env
typed-racket/env/type-alias-env)))
(begin-for-syntax
(add-mod! (quote-module-path)))
(require typed/racket/base)
(begin
(module tnull ....
(require (lib "typed/racket/base.rkt"))
(begin
(begin-for-syntax (let () '#<void>))
(begin-for-syntax
(let ()
(|_add-mod!@(lib "typed-racket/env/env-req.rkt")|
(|_module-path-fixup@(lib "syntax/location.rkt")|
(|_variable-reference->module-source/submod@(lib "syntax/location.rkt")|
(#%variable-reference #%linkage))
'())))))
(module*
#%type-decl
....
(require (lib "typed-racket/types/numeric-tower.rkt")
(lib "typed-racket/env/type-name-env.rkt")
(lib "typed-racket/env/global-env.rkt")
(lib "typed-racket/env/type-alias-env.rkt")
(for-meta -1 "here.rkt")))))
#lang typed/racket/base
[samth@loki:/tmp plt] raco make *rkt
[samth@loki:/tmp plt] time racket rlnull.rkt
real 0m0.208s
user 0m0.160s
sys 0m0.044s
[samth@loki:/tmp plt] time racket tnull.rkt
real 0m0.265s
user 0m0.232s
sys 0m0.032s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment