From be5b3318b150243c0ea24def82c2b8d6f3f1e06d Mon Sep 17 00:00:00 2001 From: giovannicuccu Date: Sun, 28 Jan 2024 23:24:47 +0100 Subject: Solution without unsafe using vector API (#602) * Solution without unsafe * Solution without unsafe * Solution without unsafe, remove the usage of bytebuffer, passes the create_measurements3 test * bug fix for 10k test, update also the CreateMeasurements3.java to use '\n' as newline instead of the os value (if it runs on windows it uses crlf and "breaks" the file format ) --------- Co-authored-by: Giovanni Cuccu --- src/main/java/dev/morling/onebrc/CreateMeasurements3.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/dev/morling/onebrc/CreateMeasurements3.java') diff --git a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java index 804b83c..9bcc16d 100644 --- a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java +++ b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java @@ -55,7 +55,7 @@ public class CreateMeasurements3 { out.write(station.name); out.write(';'); out.write(Double.toString(Math.round(temp * 10.0) / 10.0)); - out.newLine(); + out.write('\n'); if (i % 50_000_000 == 0) { System.out.printf("Wrote %,d measurements in %,d ms%n", i, System.currentTimeMillis() - start); } -- cgit v1.2.3