introduce bitloops

This commit is contained in:
mike
2026-01-19 20:45:28 +01:00
parent 5d186ae0ba
commit 5678af332e
20 changed files with 111 additions and 1005 deletions

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import puzzle.Masker.Clues;

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import puzzle.Masker.Clues;

View File

@@ -1,7 +1,7 @@
package puzzle;
import module java.base;
import puzzle.SwedishGenerator.Lemma;
import java.util.function.LongConsumer;
import static java.nio.charset.StandardCharsets.US_ASCII;
public final class CsvIndexService {

View File

@@ -1,17 +1,11 @@
package puzzle;
import module java.base;
import lombok.val;
import puzzle.Export.Dicts;
import puzzle.Export.IntListDTO;
import puzzle.SwedishGenerator.Lemma;
import java.io.*;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.util.HashMap;
public final class DictJavaGeneratorMulti {
// Smaller = more files, but safer for javac/class limits.
@@ -42,7 +36,7 @@ public final class DictJavaGeneratorMulti {
}
private static SwedishGenerator.Dict buildDict(Path wordsPath, HashMap<Path, ShardBuilder> builders) throws IOException {
var map = new LongArrayList(100_000);
var map = new Export.LongArrayList(100_000);
try (var lines = Files.lines(wordsPath, StandardCharsets.UTF_8)) {
lines.forEach(line -> {
CsvIndexService.lineToLemma(line, w -> {

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import lombok.val;
import org.junit.jupiter.api.Test;
import puzzle.Export.Clued;

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import puzzle.SwedishGenerator.Grid;
import puzzle.SwedishGenerator.Lemma;
import puzzle.SwedishGenerator.Slotinfo;

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import lombok.val;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -11,8 +12,7 @@ import puzzle.Export.PuzzleResult;
import puzzle.Export.Rewards;
import puzzle.Main.Opts;
import puzzle.SwedishGenerator.Rng;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import lombok.val;
import org.junit.jupiter.api.Test;
import puzzle.Export.Clued;
@@ -8,9 +9,6 @@ import puzzle.SwedishGenerator.DictEntry;
import puzzle.SwedishGenerator.Rng;
import puzzle.SwedishGenerator.Slotinfo;
import java.util.Arrays;
import java.util.Locale;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static puzzle.SwedishGenerator.fillMask;

View File

@@ -1,5 +1,6 @@
package puzzle;
import module java.base;
import lombok.val;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -10,8 +11,6 @@ import puzzle.Export.IntListDTO;
import puzzle.Export.LetterVisit.LetterAt;
import puzzle.Masker.Clues;
import puzzle.Masker.Slot;
import java.nio.charset.StandardCharsets;
import java.util.stream.Collectors;
import static org.junit.jupiter.api.Assertions.*;
import static puzzle.SwedishGenerator.*;