Documented the optimizer.

original commit: 8d6230956dc8c207c097a389fa1f0c7273bb55b7
This commit is contained in:
Vincent St-Amour 2010-07-16 15:24:23 -04:00
parent 1657089284
commit eb5e5f55d6
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#lang scribble/manual
@begin[(require (for-label (only-meta-in 0 typed/racket)) scribble/eval
"utils.rkt" (only-in "quick.scrbl" typed-mod))]
@(define the-eval (make-base-eval))
@(the-eval '(require typed/racket))
@title[#:tag "optimization"]{Optimization in Typed Racket}
Typed Racket provides a type-driven optimizer that rewrites well-typed
programs to potentially make them faster. It should in no way make
your programs slower or unsafe.
@section{Using the optimizer}
Typed Racket's optimizer is not currently turned on by default. If you
want to activate it, you must add the @racket[#:optimize] keyword when
specifying the language of your program:
@racketmod[typed/racket #:optimize]

View File

@ -19,6 +19,7 @@ with Racket. For an introduction to Racket, see the @(other-manual '(lib "scrib
@include-section["begin.scrbl"]
@include-section["more.scrbl"]
@include-section["types.scrbl"]
@include-section["optimization.scrbl"]
@;@section{How the Type System Works}

View File

@ -603,4 +603,17 @@ have the types ascribed to them; these types are converted to contracts and chec
(define val 17))
(fun val)]
@section{Optimization in Typed Racket}
Typed Racket provides a type-driven optimizer that rewrites well-typed
programs to potentially make them faster. It should in no way make
your programs slower or unsafe.
Typed Racket's optimizer is not currently turned on by default. If you
want to activate it, you must add the @racket[#:optimize] keyword when
specifying the language of your program:
@racketmod[typed/racket #:optimize]
}