Skip to content

Commit 9fad99b

Browse files
committed
more workers
1 parent fc6dc66 commit 9fad99b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

rounds/3_dna/solution.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import numpy as np
99

1010
_NEWLINE = b"\n"
11-
_MAX_WORKERS = 12
1211

1312

1413
def find_matches(fasta_path: str, pattern: bytes) -> list[tuple[str, list[int]]]:
@@ -23,9 +22,7 @@ def find_matches(fasta_path: str, pattern: bytes) -> list[tuple[str, list[int]]]
2322
data = file.read()
2423

2524
records = data.split(b">")[1:]
26-
worker_count = min(_MAX_WORKERS, os.cpu_count() or 1, len(records))
27-
if worker_count <= 1:
28-
return _scan_records(records, pattern_value, pattern_len)
25+
worker_count = os.cpu_count()
2926

3027
chunk_size = (len(records) + worker_count - 1) // worker_count
3128
chunks = [

0 commit comments

Comments
 (0)