Skip to content

Commit 8bd5627

Browse files
committed
A bit more of partition fine tuning
1 parent 6ada5f9 commit 8bd5627

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/blosc2/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,9 +1322,9 @@ def get_chunksize(blocksize, l3_minimum=4 * 2**20, l3_maximum=2**26):
13221322
if isinstance(l2_cache_size, int) and l3_cache_size > l2_cache_size:
13231323
chunksize = l3_cache_size
13241324
# When computing expressions, it is convenient to keep chunks for all operands
1325-
# in L3 cache, so let's divide by 4 (3 operands + result is a typical situation
1325+
# in L3 cache, so let's divide by 5 (4 operands + result is a typical situation
13261326
# for moderately complex expressions)
1327-
chunksize //= 4
1327+
chunksize //= 5
13281328

13291329
# Chunksize should be at least the size of L2
13301330
l2_cache_size = cpu_info.get("l2_cache_size", "Not found")
@@ -1529,7 +1529,7 @@ def compute_chunks_blocks( # noqa: C901
15291529
# min_blocksize = blosc2.cpu_info["l1_data_cache_size"] * 4
15301530
elif platform.system() == "Darwin" and "arm" in platform.machine():
15311531
# For Apple Silicon, experiments say we can use 4x the L1 size
1532-
min_blocksize = blosc2.cpu_info["l1_data_cache_size"] * 2
1532+
min_blocksize = blosc2.cpu_info["l1_data_cache_size"] * 4
15331533
elif "l1_data_cache_size" in blosc2.cpu_info and isinstance(
15341534
blosc2.cpu_info["l1_data_cache_size"], int
15351535
):

0 commit comments

Comments
 (0)