Re: Seeming Non-determinism in Java Programs

Randall R Schulz <[email protected]> Sun, 6 Apr 2008 20:34:45 -0700
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
On Sunday 06 April 2008 20:07, Stephen Denne wrote:
> Randall R Schulz wrote:
> > The queue is
> > implemented using a heap, though alternatives such as Skip-Lists
> > are available as options (mostly implemented because of the issue
> > I'm writing about here).
>
> You haven't explicitly mentioned it... but are you using
> java.util.PriorityQueue?

No. But I think it's of the same lineage. I originally took it from Doug
Lea's Heap code and removed the synchronization (it was quite a while
ago, and I figured the synchronization overhead was not worth it for a
single-threaded application). Probably nowadays the synchronization
would not impose a significant / measurable overhead, but at the time
(java 1.3) that was not so.


Randall Schulz

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com