Skip to content

Commit

Permalink
Rerun JOL tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrandelshofer committed Jan 2, 2025
1 parent b3a4667 commit 79b7804
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,22 @@ public void estimateMemoryUsage() {

/**
* <pre>
* class org.jhotdraw8.icollection.SimpleImmutableMap with 1000 elements.
* class org.jhotdraw8.icollection.ChampMap with 1000 elements.
* total size : 68528
* element size : 48
* data size : 48000 70%
* data structure size : 20528 29%
* overhead per element : 20.528 bytes
* ----footprint---
* org.jhotdraw8.icollection.SimpleImmutableMap@95e33ccd footprint:
* org.jhotdraw8.icollection.ChampMap@e383572d footprint:
* COUNT AVG SUM DESCRIPTION
* 283 48 13712 [Ljava.lang.Object;
* 1 24 24 org.jhotdraw8.icollection.SimpleImmutableMap
* 1 24 24 org.jhotdraw8.icollection.ChampMap
* 283 24 6792 org.jhotdraw8.icollection.impl.champmap.BitmapIndexedNode
* 1000 24 24000 org.jhotdraw8.icollection.jmh.Key
* 1000 24 24000 org.jhotdraw8.icollection.jmh.Value
* 2567 68528 (total)
* </pre>
* <pre>
* class org.jhotdraw8.icollection.SimpleImmutableMap with 1 elements.
* total size : 120
* element size : 48
* data size : 48 40%
* data structure size : 72 60%
* overhead per element : 72.0 bytes
* ----footprint---
* org.jhotdraw8.icollection.SimpleImmutableMap@6c2ed0cdd footprint:
* COUNT AVG SUM DESCRIPTION
* 1 24 24 [Ljava.lang.Object;
* 1 24 24 org.jhotdraw8.icollection.SimpleImmutableMap
* 1 24 24 org.jhotdraw8.icollection.impl.champmap.BitmapIndexedNode
* 2 24 48 org.jhotdraw8.icollection.jmh.Key
* 5 120 (total)
* </pre>
*/
@Test
@Disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,61 +16,62 @@ public class ChampVectorMapJol extends AbstractJol {

/**
* <pre>
* class org.jhotdraw8.icollection.SimpleImmutableSequencedMap with 1000 elements.
* total size : 97216
* class org.jhotdraw8.icollection.ChampVectorMap with 1000 elements.
* total size : 95736
* element size : 48
* data size : 48000 49%
* data structure size : 49216 50%
* overhead per element : 49.216 bytes
* data size : 48000 50%
* data structure size : 47736 49%
* overhead per element : 47.736 bytes
* ----footprint---
* org.jhotdraw8.icollection.SimpleImmutableSequencedMap@42530531d footprint:
* org.jhotdraw8.icollection.ChampVectorMap@512baff6d footprint:
* COUNT AVG SUM DESCRIPTION
* 343 44 15176 [Ljava.lang.Object;
* 1 24 24 org.jhotdraw8.icollection.SimpleImmutableList
* 1 32 32 org.jhotdraw8.icollection.SimpleImmutableSequencedMap
* 316 46 14568 [Ljava.lang.Object;
* 1 32 32 org.jhotdraw8.icollection.ChampVectorMap
* 1 16 16 org.jhotdraw8.icollection.VectorList
* 1 16 16 org.jhotdraw8.icollection.impl.IdentityObject
* 310 32 9920 org.jhotdraw8.icollection.impl.champ.MutableBitmapIndexedNode
* 283 32 9056 org.jhotdraw8.icollection.impl.champ.MutableBitmapIndexedNode
* 1000 24 24000 org.jhotdraw8.icollection.impl.champ.SequencedEntry
* 1 16 16 org.jhotdraw8.icollection.impl.vector.ArrayType$ObjectArrayType
* 1 32 32 org.jhotdraw8.icollection.impl.vector.BitMappedTrie
* 2000 24 48000 org.jhotdraw8.icollection.jmh.Key
* 3658 97216 (total)
* 1000 24 24000 org.jhotdraw8.icollection.jmh.Key
* 1000 24 24000 org.jhotdraw8.icollection.jmh.Value
* 3604 95736 (total)
* </pre>
*/
@Test
@Disabled

public void estimateMemoryUsage() {
int size = 1_000;
final int mask = -1;//~64;
final int mask = -1;
var data = generateMap(size, mask, size * 10);
ChampVectorMap<Key, Value> mapA = ChampVectorMap.copyOf(data);
estimateMemoryUsage(mapA, mapA.iterator().next(), mapA.size());
}

/**
* <pre>
* class org.jhotdraw8.icollection.SimpleImmutableSequencedMap with 250 elements.
* total size : 25752
* class org.jhotdraw8.icollection.ChampVectorMap with 250 elements.
* total size : 26832
* element size : 48
* data size : 12000 46%
* data structure size : 13752 53%
* overhead per element : 55.008 bytes
* data size : 12000 44%
* data structure size : 14832 55%
* overhead per element : 59.328 bytes
* ----footprint---
* org.jhotdraw8.icollection.SimpleImmutableSequencedMap@62010f5cd footprint:
* org.jhotdraw8.icollection.ChampVectorMap@32c726eed footprint:
* COUNT AVG SUM DESCRIPTION
* 92 53 4944 [Ljava.lang.Object;
* 1 16 16 org.jhotdraw8.icollection.SimpleImmutableList
* 1 32 32 org.jhotdraw8.icollection.SimpleImmutableSequencedMap
* 115 47 5432 [Ljava.lang.Object;
* 1 32 32 org.jhotdraw8.icollection.ChampVectorMap
* 1 16 16 org.jhotdraw8.icollection.VectorList
* 1 16 16 org.jhotdraw8.icollection.impl.IdentityObject
* 75 32 2400 org.jhotdraw8.icollection.impl.champ.MutableBitmapIndexedNode
* 251 24 6024 org.jhotdraw8.icollection.impl.champ.SequencedEntry
* 14 16 224 org.jhotdraw8.icollection.impl.champ.Tombstone
* 95 32 3040 org.jhotdraw8.icollection.impl.champ.MutableBitmapIndexedNode
* 3 24 72 org.jhotdraw8.icollection.impl.champ.MutableHashCollisionNode
* 250 24 6000 org.jhotdraw8.icollection.impl.champ.SequencedEntry
* 11 16 176 org.jhotdraw8.icollection.impl.champ.Tombstone
* 1 16 16 org.jhotdraw8.icollection.impl.vector.ArrayType$ObjectArrayType
* 1 32 32 org.jhotdraw8.icollection.impl.vector.BitMappedTrie
* 251 24 6024 org.jhotdraw8.icollection.jmh.Key
* 251 24 6024 org.jhotdraw8.icollection.jmh.Value
* 939 25752 (total)
* 250 24 6000 org.jhotdraw8.icollection.jmh.Key
* 250 24 6000 org.jhotdraw8.icollection.jmh.Value
* 979 26832 (total)
* </pre>
*/
@Test
Expand Down

0 comments on commit 79b7804

Please sign in to comment.