From b2a4b73c590bf9a52fd43e626c7b9b314f91fe32 Mon Sep 17 00:00:00 2001 From: abeobk Date: Sat, 13 Jan 2024 20:50:43 +0900 Subject: [PATCH] use all CPUs --- src/main/java/dev/morling/onebrc/CalculateAverage_abeobk.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/morling/onebrc/CalculateAverage_abeobk.java b/src/main/java/dev/morling/onebrc/CalculateAverage_abeobk.java index 9d0027c..1a71349 100644 --- a/src/main/java/dev/morling/onebrc/CalculateAverage_abeobk.java +++ b/src/main/java/dev/morling/onebrc/CalculateAverage_abeobk.java @@ -136,7 +136,7 @@ public class CalculateAverage_abeobk { } public static void main(String[] args) throws InterruptedException, IOException { - int cpu_cnt = Runtime.getRuntime().availableProcessors() / 2; + int cpu_cnt = Runtime.getRuntime().availableProcessors(); try (var file = FileChannel.open(Path.of(FILE), StandardOpenOption.READ)) { long start_addr = file.map(MapMode.READ_ONLY, 0, file.size(), Arena.global()).address(); long file_size = file.size();