@@ -1982,15 +1982,12 @@ cdef int aux_miniexpr(me_udata *udata, int64_t nchunk, int32_t nblock,
19821982 elif blocknitems != expected_blocknitems:
19831983 raise ValueError (" miniexpr: inconsistent block element counts across inputs" )
19841984 start = nblock * blocknitems
1985- # A way to check for top speed
1986- if False :
1987- # Unsafe, but it works for special arrays (e.g. blosc2.ones), and can be fast
1988- dctx = ndarr.sc.dctx
1989- else :
1990- # This is needed for thread safety, but adds a pretty low overhead (< 400ns on a modern CPU)
1991- # In the future, perhaps one can create a specific (serial) context just for
1992- # blosc2_getitem_ctx, but this is probably never going to be necessary.
1993- dctx = blosc2_create_dctx(BLOSC2_DPARAMS_DEFAULTS)
1985+ # This is needed for thread safety, but adds a pretty low overhead (< 400ns on a modern CPU)
1986+ # In the future, perhaps one can create a specific (serial) context just for
1987+ # blosc2_getitem_ctx, but this is probably never going to be necessary.
1988+ dctx = blosc2_create_dctx(BLOSC2_DPARAMS_DEFAULTS)
1989+ # Unsafe, but it works for special arrays (e.g. blosc2.ones), and can be used for profiling
1990+ # dctx = ndarr.sc.dctx
19941991 if valid_nitems > blocknitems:
19951992 raise ValueError (" miniexpr: valid items exceed padded block size" )
19961993 rc = blosc2_getitem_ctx(dctx, src, chunk_cbytes, start, blocknitems,
0 commit comments