My 1billion row challenge solutions in various languages

Move attribution into weather_stations.csv

Changed files
+3 -1
data
src
main
java
dev
morling
+1
data/weather_stations.csv
···
+
# Adapted from https://simplemaps.com/data/world-cities
Tokyo;35.6897
Jakarta;-6.1750
Delhi;28.6100
+2 -1
src/main/java/dev/morling/onebrc/CreateMeasurements3.java
···
// Use a public list of city names and concatenate them all into a long string,
// which we'll use as a "source of city name randomness"
var bigName = new StringBuilder(1 << 20);
-
// Source: https://simplemaps.com/data/world-cities
try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"));) {
+
rows.readLine(); // Skip the attribution line
while (true) {
var row = rows.readLine();
if (row == null) {
···
var minLen = Integer.MAX_VALUE;
var maxLen = Integer.MIN_VALUE;
try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"))) {
+
rows.readLine(); // Skip the attribution line
final var nameSource = new StringReader(bigName.toString());
final var buf = new char[MAX_NAME_LEN];
final var rnd = ThreadLocalRandom.current();