Skip to content
Permalink
Browse files

lockfree pooling (#10)

* Clean up and javadoc fixes (#1)

* V13us without synchronized pools and NT

* ObjectPool<Node>

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* RD-93 lockfree pooling (#2)

* V13us without synchronized pools and NT

* ObjectPool<Node>

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* V16 without synchronized pools

* Fixed enable/disable pooling

* Javadoc fixes

* ObjectPool test
  • Loading branch information...
improbable-til authored and tzaeschke committed Mar 8, 2019
1 parent 981cb49 commit 5ed34459533ca05e29484667384961b5c6c85752
Showing with 7,797 additions and 2,984 deletions.
  1. +4 −0 CHANGELOG
  2. +5 −0 README.md
  3. +205 −193 pom.xml
  4. +41 −28 src/main/java/ch/ethz/globis/phtree/PhTree.java
  5. +1 −0 src/main/java/ch/ethz/globis/phtree/PhTreeHelper.java
  6. +29 −567 src/main/java/ch/ethz/globis/phtree/util/BitsLong.java
  7. +147 −0 src/main/java/ch/ethz/globis/phtree/util/unsynced/LongArrayArrayPool.java
  8. +675 −0 src/main/java/ch/ethz/globis/phtree/util/unsynced/LongArrayOps.java
  9. +170 −0 src/main/java/ch/ethz/globis/phtree/util/unsynced/LongArrayPool.java
  10. +265 −0 src/main/java/ch/ethz/globis/phtree/util/unsynced/ObjectArrayPool.java
  11. +70 −0 src/main/java/ch/ethz/globis/phtree/util/unsynced/ObjectPool.java
  12. +16 −5 src/main/java/ch/ethz/globis/phtree/v13/Bits.java
  13. +69 −547 src/main/java/ch/ethz/globis/phtree/v13/Node.java
  14. +17 −39 src/main/java/ch/ethz/globis/phtree/v13/NodeIteratorFullNoGC.java
  15. +18 −23 src/main/java/ch/ethz/globis/phtree/v13/NodeIteratorFullToList.java
  16. +20 −106 src/main/java/ch/ethz/globis/phtree/v13/NodeIteratorListReuse.java
  17. +19 −115 src/main/java/ch/ethz/globis/phtree/v13/NodeIteratorNoGC.java
  18. +1 −2 src/main/java/ch/ethz/globis/phtree/v13/PhIteratorFullNoGC.java
  19. +1 −2 src/main/java/ch/ethz/globis/phtree/v13/PhIteratorNoGC.java
  20. +2 −2 src/main/java/ch/ethz/globis/phtree/v13/PhQueryKnnHS.java
  21. +4 −4 src/main/java/ch/ethz/globis/phtree/v13/PhQueryKnnMbbPP.java
  22. +3 −3 src/main/java/ch/ethz/globis/phtree/v13/PhQueryKnnMbbPPList.java
  23. +3 −3 src/main/java/ch/ethz/globis/phtree/v13/PhResultList.java
  24. +50 −62 src/main/java/ch/ethz/globis/phtree/v13/PhTree13.java
  25. +1 −1 src/main/java/ch/ethz/globis/phtree/{v13/nt → v13SynchedPool}/Bits.java
  26. +1,487 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/Node.java
  27. +187 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/NodeIteratorFullNoGC.java
  28. +138 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/NodeIteratorFullToList.java
  29. +379 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/NodeIteratorListReuse.java
  30. +446 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/NodeIteratorNoGC.java
  31. +2 −2 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/NodePool.java
  32. +177 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhIteratorFullNoGC.java
  33. +209 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhIteratorNoGC.java
  34. +239 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhQueryKnnHS.java
  35. +314 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhQueryKnnMbbPP.java
  36. +482 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhQueryKnnMbbPPList.java
  37. +311 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhResultList.java
  38. +559 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/PhTree13SP.java
  39. +23 −0 src/main/java/ch/ethz/globis/phtree/v13SynchedPool/nt/Bits.java
  40. +81 −81 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NodeTreeV13.java
  41. +4 −4 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtIteratorMask.java
  42. +10 −10 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtIteratorMinMax.java
  43. +7 −13 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtNode.java
  44. +17 −17 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtNodeIteratorAll.java
  45. +3 −18 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtNodeIteratorMask.java
  46. +24 −32 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtNodeIteratorMinMax.java
  47. +2 −2 src/main/java/ch/ethz/globis/phtree/{v13 → v13SynchedPool}/nt/NtNodePool.java
  48. +16 −6 src/main/java/ch/ethz/globis/phtree/v16/Bits.java
  49. +50 −63 src/main/java/ch/ethz/globis/phtree/v16/Node.java
  50. +15 −4 src/main/java/ch/ethz/globis/phtree/v16/NodeIteratorFullNoGC.java
  51. +15 −15 src/main/java/ch/ethz/globis/phtree/v16/NodeIteratorListReuse.java
  52. +17 −14 src/main/java/ch/ethz/globis/phtree/v16/NodeIteratorNoGC.java
  53. +0 −48 src/main/java/ch/ethz/globis/phtree/v16/NodePool.java
  54. +19 −16 src/main/java/ch/ethz/globis/phtree/v16/PhIteratorFullNoGC.java
  55. +17 −12 src/main/java/ch/ethz/globis/phtree/v16/PhIteratorNoGC.java
  56. +15 −4 src/main/java/ch/ethz/globis/phtree/v16/PhQueryKnnHS.java
  57. +16 −5 src/main/java/ch/ethz/globis/phtree/v16/PhQueryKnnHSZ.java
  58. +22 −9 src/main/java/ch/ethz/globis/phtree/v16/PhResultList.java
  59. +59 −38 src/main/java/ch/ethz/globis/phtree/v16/PhTree16.java
  60. +51 −240 src/main/java/ch/ethz/globis/phtree/v16/bst/BSTPool.java
  61. +33 −30 src/main/java/ch/ethz/globis/phtree/v16/bst/BSTreePage.java
  62. +14 −4 src/main/java/ch/ethz/globis/phtree/v16hd/Bits.java
  63. +22 −47 src/main/java/ch/ethz/globis/phtree/v16hd/BitsHD.java
  64. +50 −58 src/main/java/ch/ethz/globis/phtree/v16hd/Node.java
  65. +15 −5 src/main/java/ch/ethz/globis/phtree/v16hd/NodeIteratorFullNoGC.java
  66. +15 −16 src/main/java/ch/ethz/globis/phtree/v16hd/NodeIteratorListReuse.java
  67. +14 −20 src/main/java/ch/ethz/globis/phtree/v16hd/NodeIteratorNoGC.java
  68. +0 −48 src/main/java/ch/ethz/globis/phtree/v16hd/NodePool.java
  69. +18 −15 src/main/java/ch/ethz/globis/phtree/v16hd/PhIteratorFullNoGC.java
  70. +17 −13 src/main/java/ch/ethz/globis/phtree/v16hd/PhIteratorNoGC.java
  71. +15 −5 src/main/java/ch/ethz/globis/phtree/v16hd/PhQueryKnnHS.java
  72. +16 −6 src/main/java/ch/ethz/globis/phtree/v16hd/PhQueryKnnHSZ.java
  73. +22 −10 src/main/java/ch/ethz/globis/phtree/v16hd/PhResultList.java
  74. +58 −37 src/main/java/ch/ethz/globis/phtree/v16hd/PhTree16HD.java
  75. +75 −267 src/main/java/ch/ethz/globis/phtree/v16hd/bst/BSTPool.java
  76. +33 −32 src/main/java/ch/ethz/globis/phtree/v16hd/bst/BSTreePage.java
  77. +11 −9 src/test/java/ch/ethz/globis/phtree/bst/TestBST16.java
  78. +9 −7 src/test/java/ch/ethz/globis/phtree/bst/TestBST16hd.java
  79. +111 −0 src/test/java/ch/ethz/globis/phtree/test/ObjectPoolTest.java
@@ -2,6 +2,10 @@
==========
Pre-Release 2.1.0
- (TZ for Improbable) Some cleanup and javadoc updates
- (TZ for Improbable) Improvements for running multiple PH-Trees concurrently:
- removed AtomicInt entry counter
- Changed Object/array pools to be unsynchronized and local (to the tree) instead of global and synchronmized.


2018-12-04
==========
@@ -33,6 +33,11 @@ A C++ version of the PH-Tree (with slightly different design) is available [here

# News

### 2019-03-05

Released version 2.1.0 of the PH-Tree.
- Avoid 'synchronized' object pooling. Object pooling in V13, v16 and v16HD have been modified to be non-`synchronized`, instead each instance of the PhTree has its own pool. A a result, running several PhTree instances in parallel will slightly increase memory usage (due to several pools allocated), butt will completely avoid contention caused by `synchronized` pools. A `synchronized` version of V13 is still available as `v13SynchedPool`.

### 2018-12-04

Released version 2.0.2 of the PH-Tree. This release contains a minor fix and documentation updates.
Oops, something went wrong.

0 comments on commit 5ed3445

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.