[
https://issues.jboss.org/browse/JBRULES-3141?page=com.atlassian.jira.plug...
]
Brad Davis updated JBRULES-3141:
--------------------------------
Summary: Replace BinaryHeapPriorityQueue Implementation with Java's
PriorityBlockingQueue (was: Replace BinaryHeapPriorityQueue Implementation with )
Description:
Attached is a PriorityQueue implementation I wrote last night to replace our home grown
implementation. I think it must have preceded the PriorityBlockingQueue that is already
part of Java 5 & 6.
BinaryHeapPriorityQueueTest is where I plugged in this implementation. Below are the
results first running with our home grown BinaryHeapPriorityQueue, and then with the one I
created, BasePriorityQueue. There are numerous other benefits to using this as well, as
it will fully implement the java.util.Collections API and therefore cleanup some other
code elsewhere in our codebase.
The result for 10000 objects inserted and retracted was:
BinaryHeapPriortyQueue
elapsedEnqueue = 32
elapsedDequeue = 294
BasePriorityQueue
elapsedEnqueue = 26
elapsedDequeue = 167
Replace BinaryHeapPriorityQueue Implementation with Java's
PriorityBlockingQueue
--------------------------------------------------------------------------------
Key: JBRULES-3141
URL:
https://issues.jboss.org/browse/JBRULES-3141
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Brad Davis
Assignee: Mark Proctor
Attachments: BasePriorityQueue.java, BinaryHeapPriorityQueueTest.java
Attached is a PriorityQueue implementation I wrote last night to replace our home grown
implementation. I think it must have preceded the PriorityBlockingQueue that is already
part of Java 5 & 6.
BinaryHeapPriorityQueueTest is where I plugged in this implementation. Below are the
results first running with our home grown BinaryHeapPriorityQueue, and then with the one I
created, BasePriorityQueue. There are numerous other benefits to using this as well, as
it will fully implement the java.util.Collections API and therefore cleanup some other
code elsewhere in our codebase.
The result for 10000 objects inserted and retracted was:
BinaryHeapPriortyQueue
elapsedEnqueue = 32
elapsedDequeue = 294
BasePriorityQueue
elapsedEnqueue = 26
elapsedDequeue = 167
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira