Transpiled version (6758L) is out of date.
// adds entries in sorted order svoid test_compareTreeSetSizes(int n default 1000) { test_compareTreeSetSizes(uniquifyAndSort(repF(n, -> randomID(6)))); } svoid test_compareTreeSetSizes(LS data) { print("Entries: " + n2(data)); long payloadSize = sumOfObjectSizes(data); var sorted = sorted(data); L<Set<S>> sets = ll( new TreeSet(data), new CompactTreeSet(data), new UltraCompactTreeSet(data), new MegaCompactTreeSet(data), new HyperCompactTreeSet(data)); for (set : sets) { assertEquals(toList(set), sorted); print(className(set) + " OK, bytes per entry: " + formatDoubleRatio(guessObjectSize(set)-payloadSize, l(data), 4)); } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032624 |
Snippet name: | test_compareTreeSetSizes |
Eternal ID of this version: | #1032624/8 |
Text MD5: | 5f55daa3350b1f3455c9e856d6f29855 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-29 23:11:38 |
Source code size: | 706 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 136 / 209 |
Version history: | 7 change(s) |
Referenced in: | [show references] |