« Return to Thread: Towards a revised collection API

Re: Towards a revised collection API

by David MacIver :: Rate this Message:

Reply to Author | View in Thread

On Fri, Apr 18, 2008 at 1:28 PM, David MacIver <david.maciver@...> wrote:
>  >  Non-local returns are implemented via exceptions, so they are not
>  >  really efficient. I think any move away from iterators is likely to
>  >  imply a performance loss.
>
>  I disagree. Exceptions are extremely fast on the JVM and have been for
>  years. They basically compile to gotos. It's just stack trace
>  generation which is slow, which you can surpress in your
>  implementation of Throwable (which I assume Scala's non-local returns
>  do. If not, I'd consider that a bug. I'll check later).

Looks like it doesn't. I've filed a bug:
https://lampsvn.epfl.ch/trac/scala/ticket/775

 « Return to Thread: Towards a revised collection API