I'd be interested to see an actual comparison of the time it takes to parse some example files with the two different versions of 'whitespace?. Why use microbenchmarks when you can test on real-world examples?
> One difference: 'faster-in returns the found value, rather than 't.
What if that value is nil? That makes for a nasty corner case.
What if that value is nil? That makes for a nasty corner case.
oops, yes, you're right, good point
Why use microbenchmarks
using parser.arc to index tokens from arc.arc is the benchmark I use most often for tuning rainbow performance. I wanted to present the issue with as few extraneous details as possible.
Micro benchmarks can be misleading sometimes. Most of the time I get different timings for the same microbenchmark when I eval it a few times so it's really difficult to see if they really do their job when the timings are too close unless some full blown benchmark is performed on some real data.