128 Commits

Author SHA1 Message Date
andi d77d00cb37 remove reviewboardrc
We don't use the review board anymore.
2025-04-27 10:16:10 +02:00
andi 9845c00a9f improve documentation 2025-04-27 10:15:35 +02:00
andi 98a3cf9ebe update gradle to 8.6 2024-03-10 14:05:12 +01:00
andi e6b60ed59b update to jdk 17 2023-02-08 20:11:22 +01:00
andi 68567c1b48 Merge branch 'master' of https://git.lucares.de/andi/primitive-collections 2023-02-08 20:04:21 +01:00
andi 0e98ba493b update 3rd party libs 2023-02-08 19:50:53 +01:00
andi ee55ed9683 Update 'README.md' 2022-08-25 15:12:53 +00:00
andi 88808edf01 Update 'README.md' 2022-08-22 18:02:18 +00:00
andi 58891020e8 Update 'README.md' 2022-08-15 16:19:49 +00:00
andi 078c0273bf Update 'README.md' 2022-08-15 16:18:50 +00:00
andi e0a045f1e8 Merge pull request 'update dependencies' (#1) from update-dependencies into master
Reviewed-on: #1
2022-08-15 15:56:22 +00:00
andi 22a561db32 fix version in example 2022-08-15 17:46:33 +02:00
andi 2f93ea6dbe update dependencies 2022-08-15 17:43:57 +02:00
andi f127faa98e update 3rd party libs 2021-07-11 08:13:44 +02:00
andi a7b599c8b4 update Gradle to 7.0
Had to disable java.modularity.inferModulePath, because JUnit
was put on the module path and didn't want to start (class not
found). Probably because I didn't have a module-info.java.
2021-04-16 18:41:43 +02:00
andi c6e1d47a83 update dependencies 2021-04-16 17:53:55 +02:00
andi 062d63ca02 add maxCapacity to LongLongHashMap
This allows us to define an upper limit for the memory usage.
2021-04-16 17:52:15 +02:00
andi 9de619d815 accidental linear access times instead of constant
Methods for finding keys in the map would iterate over all keys
when the key did not exist.
Fixed by introducing a new sentinel value (-1) that is used to
mark slots that were previously occupied.
2021-04-04 10:17:30 +02:00
andi f43cc2eda2 use static version numbers
This makes it easier to pull the artifacts from maven local.
2021-04-02 19:20:16 +02:00
andi 2840fea751 fix publish configuration
publish is now possible with the tasks publishToMavenLocal and
publishMavenJavaPublicationToMyRepoRepository
2021-04-02 19:19:21 +02:00
andi d57c69119e update gradle to 6.8.3 2021-04-02 18:39:03 +02:00
andi 1354c396c4 update versions plugin 2020-11-15 12:40:41 +01:00
andi 6bd4b9b424 improve performance of LongList.union 2020-11-15 12:39:07 +01:00
andi 54fbebf0b7 cleanup 2020-11-07 17:30:47 +01:00
andi c6d0182af7 generate random lists for benchmarks
turns out this changes the performance characteristics dramatically
2020-11-07 17:28:30 +01:00
andi 50d2901b72 make local variables first when accessing fields multiple times 2020-11-07 13:13:38 +01:00
andi 88f7abfc91 inline of array in LongQueue by creating a getting a reference to the
array of LongList
2020-11-07 08:45:51 +01:00
andi c9dcbdbe97 performance improvements
the heap refill code was recursively implemented with two methods.
I merged both methods.

replace recursion in heap refill method with iterative approach

use array for list of LongQueue
This way there is no precondition when accessing the elements
2020-11-07 08:36:07 +01:00
andi a427df09aa changed the value of UNSET from Long.MIN_VALUE to LONG.MAX_VALUE
That made the code in fillWithMinOfChildren() easier. We lost an early
out, though. But that should be negligible.
2020-11-06 19:41:48 +01:00
andi 8a5309fbe8 multiway merge of multiple sorted lists 2020-11-06 19:22:45 +01:00
andi 5b5e948293 update dependencies 2020-11-05 17:55:55 +01:00
andi 3f4b5b409a update gradle 2020-11-05 17:53:47 +01:00
andi 2b85828700 update gradle 2020-07-11 17:26:41 +02:00
andi d76551db2c update 3rd party libs 2019-12-27 12:14:09 +01:00
andi c6f5a3d2fe add Sparse2DLongArray 2019-12-26 15:44:58 +01:00
andi ec7a03f068 LongLongHashMap.get should no longer throw NoSuchElementException
In many use cases it is more efficient to have a getter that returns
a default value instead of throwing an exception. The exception forces
every consumer to call containsKey() before calling get(). In cases
where the consumer wants to use a default value this is unnecessary.
2019-12-22 19:14:41 +01:00
andi 955b410ba3 update 3rd party libs 2019-12-22 19:09:37 +01:00
andi 98bdb35c40 update gradle versions plugin to 0.24.0 2019-09-07 17:54:50 +02:00
andi 0751802dd0 update gradle to 5.6.2 2019-09-07 17:53:38 +02:00
andi 6421b82ce1 remove benchmark harness
we are using JMH instead
2019-09-07 17:52:14 +02:00
andi 9f60c59aca add JMH tests for union of long list and uniq of lon/int list 2019-09-07 17:49:53 +02:00
andi 452ef2020d fix LongLongHashMap.forEachOrdered for negative values 2019-09-07 16:51:30 +02:00
andi 4d92197423 fix stackoverflow in Int/LongList.intersectionUnsorted 2019-09-07 16:50:40 +02:00
andi 86f12e0af6 Add hash map for long to long mappings. 2019-09-07 14:36:51 +02:00
andi 097b7ab110 add more JMH tests 2019-09-01 15:47:10 +02:00
andi 0311ecd83c recover deleted JMH tests
update gradle and other third-party libs
2019-08-22 19:57:27 +02:00
andi 506fb7b698 add new method 'uniq()' 2019-08-22 19:21:24 +02:00
andi ed703db277 speed improvement for intersectionSorted()
Using the unsafe versions of add/get to improve performance.

Here are some numbers for 2^15 intersections of two random
sorted lists with 16k elements. The numbers were gathered with
perf stat -d -d -d --delay 2000 java -ea -cp bin/test:bin/main
org.lucares.collections.Test 16000 15 (the test class is not committed)

Duration: 9059ms -> 7293ms (80.5%)
Cycles: 26.084.812.051 -> 21.616.608.207 (82.9%)
Instructions: 68.045.848.666 -> 52.306.000.150 (76.9%)
Instructions per Cycle: 2,61 -> 2.42
Branches: 15.007.093.940 -> 9.839.481.658 (65.6%)
Branch Misses: 2.285.461 -> 1.551.906
Cycles per element: 24.87 -> 20.61 (82.9%)
2019-04-28 12:48:17 +02:00
andi cedccefe92 20% speedup of unionSorted()
Added getUnsafe and addUnsafe, two methods that skip checks.
The checks are not needed in unionSorted, because we made
sure the code works correctly. getUnsafe still has the checks,
but as assertions.

The speedup is roughly 20%. Here are some results for calling
union 2^16 times for two random sorted lists with 16k
elements:
Duration: 20170 -> 16857 (83.57%)
Instructions: 138.277.743.679 -> 108.474.027.213 (78.4%)
Instructions per cycle: 2,33 -> 2,18
Branches: 30.248.330.644 -> 19.908.207.057 (65.8%)
Branch Misses: 3.012.427 -> 3.477.433
Cycles per list element: 65.93 -> 51.72 (78.4%)

Created with (the test program is not committed) on a Core2Duo 8600:
perf stat -d -d -d --delay 2000 java -cp bin/test:bin/main
org.lucares.collections.Test 16000 16
2019-04-28 11:05:13 +02:00
andi 1420c21732 update 3rd party libs and gradle 2019-04-27 18:04:59 +02:00