adjust Guide to warn about performance measurement in DrRacket

This commit is contained in:
Matthew Flatt 2011-05-24 08:02:09 -06:00
parent 0aefb8d43c
commit 00e17ab51f
2 changed files with 29 additions and 0 deletions

View File

@ -5,6 +5,9 @@
@title[#:tag "performance"]{Performance}
@section-index["benchmarking"]
@section-index["speed"]
Alan Perlis famously quipped ``Lisp programmers know the value of
everything and the cost of nothing.'' A Racket programmer knows, for
example, that a @racket[lambda] anywhere in a program produces a value
@ -20,6 +23,27 @@ and memory performance of Racket code.
@; ----------------------------------------------------------------------
@section[#:tag "DrRacket-perf"]{Performance in DrRacket}
By default, DrRacket instruments programs for debugging, and
debugging instrumentation can significantly degrade performance for
some programs. Even when debugging is disabled through the
@onscreen{Choose Language...} dialog's @onscreen{Show Details} panel,
the @onscreen{Preserve stacktrace} checkbox is clicked by default,
which also affects performance. Disabling debugging and stacktrace
preservation provides performance results that are more consistent
with running in plain @exec{racket}.
Even so, DrRacket and programs developed within DrRacket use the same
Racket virtual machine, so garbage collection times (see
@secref["gc-perf"]) may be longer in DrRacket than when a program is
run by itself, and DrRacket threads may impede execution of program
threads. For the most reliable timing results for a program, run in
plain @exec{racket} instead of in the DrRacket development
environment.
@; ----------------------------------------------------------------------
@section[#:tag "JIT"]{The Bytecode and Just-in-Time (JIT) Compilers}
Every definition or expression to be evaluated by Racket is compiled

View File

@ -12,6 +12,11 @@ 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.
@margin-note{For general information Racket performance and
benchmarking, see @secref[#:doc '(lib
"scribblings/guide/guide.scrbl")]{performance}.}
@section{Turning the optimizer off}
Typed Racket's optimizer is turned on by default. If you want to