slow performance of loom continuations
Alan Bateman
Alan.Bateman at oracle.com
Mon Sep 10 16:18:31 UTC 2018
On 07/09/2018 05:47, seth lytle wrote:
> :
>
> am i using the api correctly ? i do use exceptions in other continuations,
> so UseNewCode isn't really an option for me
>
> i realize that this is an early prototype. do you have any idea what
> performance you're ultimately shooting for for this sort of loop ?
>
> is there a tradeoff between performance in these simple cases and being
> able to weave "most" production code ?
>
I skimmed through the code in your mail and you appear to be using
continuation API correctly. It's early days in this project and too
early to draw any conclusions on whether the approach to freezing and
thawing the stack is the best approach or not. One performance issue is
the current prototype is the detection of monitors in compiled frames -
you can use -XX:-DetectLocksInCompiledFrames to workaround that issue
temporarily which should help your test a bit (but not significantly).
Yes, there are trade-offs when comparing it to approaches that employ
state machines and bytecode re-writing.
-Alan
More information about the loom-dev
mailing list