GV
Size: a a a
GV
НП
НП
P
g
l
AC
D
БТ
СШ
НЗ
НЗ
AL
Arrays.stream(test.split("\\s+"))
.filter(s -> s.equals(word))
.count();
Arrays.stream(test.split("\\s+"))
.collect(Collectors.groupingBy(e -> e, Collectors.counting()));
Benchmark Mode Cnt Score Error Units
Benchmark.plainStreamWithArray avgt 9 10,424 ± 2,444 ms/op
Benchmark.streamToMap avgt 9 48,828 ± 9,693 ms/op
AC
AZ
AC
AC
GI
AC
GI