173 |
|
static long itest(Collection<Integer> c, int max, int trials) throws Exception { |
174 |
|
if (c == null) throw new Error(); |
175 |
|
Thread.sleep(250); |
176 |
< |
long tlast = System.nanoTime(); |
176 |
> |
long tlast = System.nanoTime(); |
177 |
|
for (int i = 0; i < trials; ++i) { |
178 |
|
Integer pmax = Integer.valueOf(Integer.MIN_VALUE - checksum.get()); |
179 |
|
for (Integer x : c) |
186 |
|
static long stest(Collection<Integer> c, int max, int trials) throws Exception { |
187 |
|
if (c == null) throw new Error(); |
188 |
|
Thread.sleep(250); |
189 |
< |
long tlast = System.nanoTime(); |
189 |
> |
long tlast = System.nanoTime(); |
190 |
|
for (int i = 0; i < trials; ++i) { |
191 |
|
int pmax = c.stream().reduce |
192 |
|
(Integer.valueOf(Integer.MIN_VALUE - checksum.get()), MAX); |
198 |
|
static long ptest(Collection<Integer> c, int max, int trials) throws Exception { |
199 |
|
if (c == null) throw new Error(); |
200 |
|
Thread.sleep(250); |
201 |
< |
long tlast = System.nanoTime(); |
201 |
> |
long tlast = System.nanoTime(); |
202 |
|
for (int i = 0; i < trials; ++i) { |
203 |
|
int pmax = c.parallelStream().reduce |
204 |
|
(Integer.valueOf(Integer.MIN_VALUE - checksum.get()), MAX); |