Would having (optional) type annotation, or even a relatively coercitive type system help much in the way of performance?
Admittedly, this wouldn't be scheme anymore, but are there example of this done in the wild with profitable impact? E.g. even as an extension to RXRS.
I'd guess if you're sure your `fib` function handles only integers, you should get a lot of easy inlining/specialization at your disposition.
Chez instead provides typed/unchecked arithmetic functions, like fx+, flround and so on. In my experience, those sometimes make a big impact on performance(though realistically in some of those cases it would be better to ask C to do it for you).
I'd guess if you're sure your `fib` function handles only integers, you should get a lot of easy inlining/specialization at your disposition.