shivers@lambda.ai.mit.EDU (Olin Shivers) wrote:
> All of READ-LINE's overhead is per-call type-checking, optional arg
> defaulting, FFI overhead, and other Scheme-side stuff, not per-char
> I/O stuff. That happens quite quickly, at native-code rates.
Given the relative speed of native-code work vs. raw C work, it might
be fruitful to examine how some of these steps can be shortened.
Someone with sufficient interest might consider putting the code
through a program analysis tool that eliminates run-time checks.
Andrew Wright's Soft Scheme does this, as does Cormac Flanagan's
SBA-based analyzer. These operate by imposing a type system and then
proving invariants about the program as a result of which they can
prove that certain operations need not have run-time checks.
I should add that both works are partly intellectual descendants of a
dissertation on the analysis of higher-order languages written at CMU
by one Olin Shivers.
'shriram
Links:
Soft Scheme: http://www.neci.nj.nec.com/homepages/wright.html
SBA analyzer: http://www.cs.rice.edu/CS/PLT/packages/drscheme/
|