Re: Looping construction using only MethodHandles

2011-12-08 Thread MLeo
I do think I remember that (I've been subscribed to the list since 2009-01-21), this was mostly an attempt to see how far it would go (and to get my brain wired for the MethodHandle API). However, are the discounted code size budgets the only reason why the MethodHandle 'loop' can recurse 2x to 6x

Re: Looping construction using only MethodHandles

2011-12-05 Thread Charles Oliver Nutter
This actually came up early this past summer, when I tried to do the same thing (after Ola Bini showed me the MutableCallSite invoker trick. You can probably find the thread in July some time. The bottom line was that even if the handles could get folded into tail recursion, the call site ends up

Looping construction using only MethodHandles

2011-12-05 Thread MLeo
Hello all, Over the past few days I've been thinkering with a bit of code that folds over the values of some container using some MethodHandle and a 'zero' value. https://gist.github.com/1425706 It's actually an implementation of a strategy to encode higher order functions (HOF) without introduc