[concurrency-interest] Default Stack Size on 64-bit JVMs

Vitaly Davidovich vitalyd at gmail.com
Mon Dec 7 08:07:58 EST 2015


The bigger problem would be the allocation of an explicit data structure to
maintain the stack (i.e. GC pressure).

sent from my phone
On Dec 7, 2015 8:03 AM, "David M. Lloyd" <david.lloyd at redhat.com> wrote:

> On 12/07/2015 04:40 AM, Andrew Haley wrote:
>
>> On 02/12/15 20:25, Jorge Branco wrote:
>>
>>> Has it been considered to eliminate the use of recursion entirely from
>>>> the concurrency library (or for that matter the JDK) ?  Any need for
>>>> recursion can be readily transformed into the use of a stack.
>>>>
>>>
>>> Wouldn't that entail a huge performance cost? Some very raw experiments
>>> I've done in the past seemed to imply that a (Java) stack would give a
>>> terrible performance in comparison with equivalent algorithms using plain
>>> recursion.
>>>
>>
>> I can't immediately see any reason it should.  There's no way to tell
>> for sure without real code.
>>
>
> Using ArrayDeque instead of Stack would be a good first step, as the
> latter uses synchronization everywhere.  Also, proper initial sizing is
> very important to performance for large operations to avoid copying.
> --
> - DML
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20151207/8b2643f7/attachment.html>


More information about the Concurrency-interest mailing list