Note: This is an old post from back when I was trying to make sense of why inets are so fast for evaluating some λ-terms. It has some silly bits, I learned a lot since and could probably write a better article today, but I think this can still be insightful for these getting started, so I'll leave it here.
Yesterday, I reported the bizarre observation that certain functions can behave as if they had negative complexity. If you haven’t checked that article yet, it isn’t necessary, but you should, as it may blow your mind. In short, the λ-term f(bits) = copy(comp(inc,n,bits))
, when given to optimal λ-calculus evaluator, is asymptotically faster than g(bits) = comp(inc,n,bits)
; i.e.,copy
(a O(1)
operation for a fixed size) behaves as if it had a O(1/n)
complexity, causing the program to run faster by doing more things (!?).
That’s not the only bizarre complexity result I had when