1. C_xxx in runtime.c check as few argument types and ranges as
possible consistent with genericity of operation.
2. Type and range checks are inserted in library.scm before calling
C_xxxx procedures so that they are absent in the unsafe library code
and in any unsafe code which inlines the library procedures (using
(declare (unsafe) (usual-integrations) (inline)), would inline these
I assume).
This shouldn't be too much work, and it's pretty straightforward work
at that. I would be happy to implement it and submit patches if
felix and others think it's OK to include. We could then check for
improvement on, say, the shootout benchmarks.