Switched Lists.listOf to use new ArrayList(size) constructor to avoid memory copies. Added new ArrayListDSL which mirrors the ListDSL to offer similar flexability #57
Adds a new generator for ArrayList which avoids using java.util.stream.Collector when size is know ahead of time. What I see with list generators is that a lot of time is spent growing the array (since Collector does not know the input size), so can avoid this by pre-allocating the array at the start.
Adds a new generator for ArrayList which avoids using
java.util.stream.Collector
when size is know ahead of time. What I see with list generators is that a lot of time is spent growing the array (sinceCollector
does not know the input size), so can avoid this by pre-allocating the array at the start.