RE: RFR(m): JEP 269 initial API and skeleton implementation (JDK-8139232)

2015-12-01 Thread Rezaei, Mohammad A.
antee, I might as well do my own "static final List EMPTY = ...". Thanks Moh >-Original Message- >From: Brian Goetz [mailto:brian.go...@oracle.com] >Sent: Tuesday, December 01, 2015 10:03 PM >To: Stuart Marks; Rezaei, Mohammad A. [Tech] >Cc: 'core-libs-dev&

RE: RFR(m): JEP 269 initial API and skeleton implementation (JDK-8139232)

2015-11-24 Thread Rezaei, Mohammad A.
Value based things make a lot of sense for types that don't belong to well established reference hierarchies. I can even see great uses for a value based List implementation, so long as it's preferentially referenced as the exact type (e.g. private ValueBasedList someList = ...) and rarely cast

RE: RFR(m): JEP 269 initial API and skeleton implementation (JDK-8139232)

2015-11-24 Thread Rezaei, Mohammad A.
Can the Javadoc for of() (no args) be enhanced to spell out the cost/garbage semantics? Collections.emptyList() does a great job of that: * @implNote * Implementations of this method need not create a separate List * object for each call. Using this method is likely to have compa

RE: [concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor?

2015-10-21 Thread Rezaei, Mohammad A.
>> Might the following be needed or not: >> >> Reference(T referent, ReferenceQueue queue) { >> this.referent = referent; >> this.queue = (queue == null) ? ReferenceQueue.NULL : queue; >> reachabilityFence(referent); >> } > queue is marked volatile, so a simple reor

RE: Spin Loop Hint support: Draft JEP proposal

2015-10-06 Thread Rezaei, Mohammad A.
Thread.yield(), Thread.sleep(), Thread.spinLoopHint()? Somehow, it feels right (as in consistent), but also off at the same time (as in, why are these on Thread). I'd take consistent over bespoke-one-static-method-class, unless there was a concerted effort to consolidate other related api/conce

RE: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-01 Thread Rezaei, Mohammad A.
The proposed API makes good sense for what I would consider coarse grained cleanup. There is another significant use case for Weak/Soft references that is not covered here: weak/soft references used in cache like data structures, e.g. WeakHashMap. Wouldn't there be significant code reuse if I

RE: JEP 132: More-prompt finalization (Re: Another take on Finalization)

2015-06-08 Thread Rezaei, Mohammad A.
d confusion? Thanks Moh >-Original Message- >From: Peter Levart [mailto:peter.lev...@gmail.com] >Sent: Monday, June 08, 2015 1:07 PM >To: Rezaei, Mohammad A. [Tech] >Cc: 'hotspot-gc-...@openjdk.java.net openjdk.java.net'; 'core-libs- >d...@openjdk.java.net' >S

RE: JEP 132: More-prompt finalization (Re: Another take on Finalization)

2015-06-08 Thread Rezaei, Mohammad A.
Shouldn't we extend the same notion to other reference types? For Weak/Soft references, the (rough) equivalent would be a method of the kind: public void markUnqueueable() // suggestions for better method name most welcome! { this.q = ReferenceQueue.NULL; } This is quite useful when the

RE: JEP 132: More-prompt finalization

2015-06-01 Thread Rezaei, Mohammad A.
ith meaningful numbers. Thanks Moh From: Peter Levart [mailto:peter.lev...@gmail.com] Sent: Monday, June 01, 2015 5:04 AM To: Rezaei, Mohammad A. [Tech] Cc: 'hotspot-gc-...@openjdk.java.net openjdk.java.net'; 'core-libs-dev@openjdk.java.net' Subject: Re: JEP 132: More-prom

RE: JEP 132: More-prompt finalization

2015-05-31 Thread Rezaei, Mohammad A.
The problems start with the ReferenceQueue object and the heavy synchronization in it. Consider structures like j.u.WeakHashMap that need to expunge entries. If such structures are made somewhat concurrent, the lock in ReferenceQueue starts to become a serious problem: - In structures

RE: JEP 132: More-prompt finalization

2015-05-29 Thread Rezaei, Mohammad A.
For what it's worth, I fully agree with David and Kirk around finalization not necessarily needing this treatment. However, I was hoping this would have the effect of improving (non-finalizable) reference handling. We've seen serious issues in WeakReference handling and have had to write some t

RE: DualPivotQuicksort webrev for JDK-8080945

2015-05-25 Thread Rezaei, Mohammad A.
Stefan, you're looking at an older version of the code. If you apply Paul's suggestions from http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033640.html the code works as expected. Thanks Moh >-Original Message- >From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.ja

RE: Patch to improve primitives Array.sort()

2015-05-22 Thread Rezaei, Mohammad A.
We have a set of JMH tests. We'll work with Sunny to make those part of the webrev (where do they go?) and the specific test you suggested below. Thanks Moh >-Original Message- >From: Paul Sandoz [mailto:paul.san...@oracle.com] >Sent: Friday, May 22, 2015 4:02 AM >To: R

RE: Patch to improve primitives Array.sort()

2015-05-21 Thread Rezaei, Mohammad A.
Cc: Chan, Sunny [Tech]; O'Leary, Kristen [Tech]; Rezaei, Mohammad A. [Tech] >Subject: Re: Patch to improve primitives Array.sort() > >Hi, > >I finally got some time to better understand the patch and more generally this >area of code. > >I applied the patch and ran the

RE: JEP 254: Compact Strings

2015-05-18 Thread Rezaei, Mohammad A.
For what it's worth, we would welcome this change. We took a large memory hit and a small performance hit when we upgraded from 1.6 to 1.7 in some of our memory-bound applications. >From a purely performance perspective, the most expensive CPU operations are >memory access these days. Anything

RE: JEP 238: Multi-Version JAR Files

2015-02-27 Thread Rezaei, Mohammad A.
Why do you expect the new classes in the JDK not to be part of the API? Simple example: I have a library that's 5 years old. The API needed the equivalent of java.util.Function (from Java 8), which obviously was not there when I wrote my library. Let's say I had defined CustomFunction and now I