lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1935) Generify PriorityQueue
Date Thu, 01 Oct 2009 22:52:23 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761381#action_12761381
] 

Uwe Schindler commented on LUCENE-1935:
---------------------------------------

I think it could be rewritten and the missing functionality with the funny name "topSkipToAndAdjustElsePop"
added somewhere. The simpliest would be a subclass:

{code}
public class ScorerDocQueue extends PriorityQueue<HeapedScorerDoc> {...}
{code}

I do not know how big the perf impact would be (if there is one). As mentioned before, there
is a small oerhead, because the overriden abstract method lessThan(HeapedScorerDoc, HeapedScorerDoc)
would be wrapped by javac as lessThan(Object, Object) - a small added cost (do not know how
big or jvm optimizes away, which I hope)

> Generify PriorityQueue
> ----------------------
>
>                 Key: LUCENE-1935
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1935
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: Other
>    Affects Versions: 2.9
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.0
>
>         Attachments: LUCENE-1935.patch
>
>
> Priority Queue should use generics like all other Java 5 Collection API classes. This
very simple, but makes code more readable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message