Hi Tagir,
On 03/07/2016 04:30 PM, Tagir F. Valeev wrote:
Hello!
Thank you for your comments!
PL> - in Limiter.put:
Nice catch! A good example when series of minor code refactorings lead
to something strange. Webrev is updated in-place:
http://cr.openjdk.java.net/~tvaleev/patches/sortedLimit/w
Hello!
Thank you for your comments!
PL> - in Limiter.put:
Nice catch! A good example when series of minor code refactorings lead
to something strange. Webrev is updated in-place:
http://cr.openjdk.java.net/~tvaleev/patches/sortedLimit/webrev/
PL> Also, what do you think of the following merging
Hi Tagir,
Nice work. I looked at the implementation and have two comments:
- in Limiter.put:
127 final boolean put(T t) {
128 int l = limit;
129 T[] d = data;
130 if (l == 1) {
131 // limit == 1 is the special case: exactly one
le
Hello!
LW> Worth noting: Guava uses a similar implementation for
LW> Ordering.leastOf, but instead of sorting the array when it's
LW> filled, does a quickselect pass to do it in O(k) time instead of O(k log
k).
Thank you for mentioning Guava. Unfortunately quickselect is not
stable, while sorte