[icfp] experience report
This commit is contained in:
parent
b14dcef86c
commit
f6840626d2
|
@ -1,18 +1,34 @@
|
|||
#lang scribble/sigplan
|
||||
@require["common.rkt"]
|
||||
|
||||
@; TODO experiment is BOGUS because it doesn't measure overhead of define/let
|
||||
@; Make those automatic and try again!
|
||||
|
||||
@title[#:tag "sec:experience"]{Experience}
|
||||
@; compile times, running times, binary size
|
||||
@; LOC reduction, bugs caught
|
||||
|
||||
Coarse measure of usefulness, applied to xxx lines of code.
|
||||
Our initial experience programming with the library has been positive.
|
||||
By far the most useful application is to @racket[regexp-match], as
|
||||
Typed Racket's default requires either a type cast or guards on each
|
||||
matched group.
|
||||
The bugs reported by @racket[printf] and others are also useful, though
|
||||
the real-time difference between catching a @racket[printf] bug during compilation
|
||||
versus finding the same bug at run-time is small, maybe 1-3 seconds.
|
||||
We have also observed performance improvements on microbenchmarks involving
|
||||
maps over large vectors, though we have yet to find the same benefits in real
|
||||
code.
|
||||
|
||||
We used the library to simplify @todo{lines} of database code and @todo{lines}
|
||||
of vector code.
|
||||
Performance of the vector code improved by @todo{xxx}, a nice bonus.
|
||||
In total, we have applied the library to 10,000 lines of Typed Racket code
|
||||
taken from 7 small projects.
|
||||
Including the library is a 1-line change, but the programmer needs to remove
|
||||
now-redundant type annotations and casts manually.
|
||||
Compiling with our library adds no statistically significant overhead, but
|
||||
tends to produce slightly larger bytecode files (at most 2% larger).
|
||||
Running times are slightly worse for the added casts; in the worst case
|
||||
we saw 2-second slowdown.
|
||||
This could be improved by tighter integration with the type checker.
|
||||
|
||||
@todo{figure} gives microbenchmarking results for printf, regexp, and vector-@todo{}.
|
||||
Have compile-time, executable size, and run-time.
|
||||
Things look okay.
|
||||
We don't bother trying to quantify the bug-catching utility.
|
||||
|
||||
@;@figure["fig:experience"
|
||||
@; "Experience Report"
|
||||
@; @exact|{\input{fig-experience}}|
|
||||
@;]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
\begin{center}
|
||||
\begin{tabular}{l l l}
|
||||
\emph{Syntax Class} & \emph{Purpose} \\\hline
|
||||
Syntax Class & Purpose \\\hline
|
||||
\mod{fun/arity} & Infer function arity \\
|
||||
\mod{num/value} & Evaluate a numeric expression \\
|
||||
\mod{pattern/groups} & Count regexp groups \\
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
@; - a note on macro-land? where truthy & boolean monads are king?
|
||||
@; - also, the untyped style of reasoning, the needing to unfold code
|
||||
@; - transf vs. macro
|
||||
@; - remove "OUR"
|
||||
|
||||
|
||||
@require["common.rkt"]
|
||||
|
|
|
@ -253,6 +253,8 @@ Our implementation employs the first strategy, but generates a new @racket[curry
|
|||
at each call site by folding over the inferred function domain.
|
||||
@; Mention this later, or show code?
|
||||
|
||||
TODO same goes for zipWith in a language without polydots
|
||||
|
||||
|
||||
@; =============================================================================
|
||||
@section{Constant Folding}
|
||||
|
|
Loading…
Reference in New Issue
Block a user