MCPcopy Create free account
hub / github.com/PyTables/PyTables / calcoptlevels

Function calcoptlevels

tables/idxutils.py:213–227  ·  view source on GitHub ↗

Compute the optimizations to be done. The calculation is based on the number of blocks, optlevel and indexing mode.

(
    nblocks: int, optlevel: int, indsize: int
)

Source from the content-addressed store, hash-verified

211
212
213def calcoptlevels(
214 nblocks: int, optlevel: int, indsize: int
215) -> tuple[bool, bool, bool, bool]:
216 """Compute the optimizations to be done.
217
218 The calculation is based on the number of blocks, optlevel and
219 indexing mode.
220
221 """
222 if indsize == 2: # light
223 return col_light(nblocks, optlevel)
224 elif indsize == 4: # medium
225 return col_medium(nblocks, optlevel)
226 elif indsize == 8: # full
227 return col_full(nblocks, optlevel)
228
229
230def col_light(nblocks: int, optlevel: int) -> tuple[bool, bool, bool, bool]:

Callers 1

optimizeMethod · 0.85

Calls 3

col_lightFunction · 0.85
col_mediumFunction · 0.85
col_fullFunction · 0.85

Tested by

no test coverage detected