Andreas Huber c73d43c214 replace removeAll/retainAll implementation with one a removeIf based
The algorithms for removeAll, retainAll and removeIf were almost
identical. The main difference was, that removeIf calls a lambda,
whereas removeAll and retainAll executed the check directly. Both
methods call indexOf on an IntList, which easily outweighs the extra
cost of the lambda.
It makes sense to consolidate and remove the duplicated code.

I ran a few benchmarks with different list sizes before the replacement.
The results are not as clear as I would have liked. In some cases,
especially for short lists, the special implementations of
removeAll/retainAll were up to 10% faster. In other situations I saw
50% difference the one day, but could not reproduce those results a 
day later. This leads me to believe, that my test setup is not
trustworthy.
That means I stay with what I now. The code is identical with one tiny
difference. And that difference shouldn't matter, because indexOf is 
much more expensive.
2017-12-20 18:45:42 +01:00
2017-12-13 20:44:49 +01:00
2017-12-20 17:51:15 +01:00
2017-11-10 10:09:53 +01:00
2017-09-26 19:30:58 +02:00
2017-02-04 09:10:28 +01:00

Java collections for primitives (currently only int) released under MIT license.

IntList is an implementation of a list to store primitive integers. You can add, insert, replace and remove elements in the list. The ints are stored in an int array and the class takes care of growing the array as needed. You can trim the list to reduce the memory overhead.

Description
No description provided
Readme MIT 667 KiB
Languages
Java 99.9%
Shell 0.1%