Skip to content

Debug - #148

Merged
Hendrik-code merged 11 commits into
mainfrom
debug
Sep 2, 2026
Merged

Debug#148
Hendrik-code merged 11 commits into
mainfrom
debug

Conversation

@robert-graf

Copy link
Copy Markdown
Collaborator

Requires feat(registration): DeepALI closed-form point reg + template pre-registration hook - #139 to be merged.

adds nan handling.
speed up stitching by skipping non-overlapping images.
DICOM export creates a file to remember what was already exported, so we can safely rerun it independently.

@robert-graf robert-graf added enhancement New feature or request speed/mem Changes that improve speed/memory of code execution labels Sep 1, 2026
@robert-graf robert-graf self-assigned this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Benchmark comparison

Speed (wall time per call)

baseline 8479ec9 vs head 8479ec9 · python 3.11.16 · 5 repeats + 1 warmup

Showing the 5 most-changed measurements per case; the rest are collapsed. Rows with a baseline below 3 ms are tagged (noise) — runner jitter on those swamps any real change.

ct_3d — shape (73, 47, 73)

Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
poi_calc_centroids_nocrop 4.49 ±0.07 4.69 ±0.08 +4.3% 0.002
nii_filter_connected_components 4.41 ±0.06 4.28 ±0.05 -2.8% 0.004
nii_erode_msk 6.17 ±0.07 6.33 ±0.07 +2.7% 0.001
nii_dilate_msk 120.29 ±0.34 121.54 ±0.64 +1.0% 0.002
poi_calc_poi_from_subreg_vert 11.72 ±0.24 11.61 ±0.22 -1.0% 0.730
… 31 more measurements
Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
nii_fill_holes 4.66 ±0.02 4.70 ±0.06 +0.9% 0.202
nii_rescale_seg 3.26 ±0.04 3.28 ±0.04 +0.7% 0.624
nii_save 11.72 ±0.14 11.79 ±0.16 +0.6% 0.272
nii_resample_from_to 41.62 ±0.16 41.82 ±0.36 +0.5% 0.352
nii_load_img 12.15 ±0.15 12.11 ±0.12 -0.3% 0.415
nii_rescale 39.99 ±0.29 40.12 ±0.23 +0.3% 0.957
metric_voxels 250463.00 ±0.00 250463.00 ±0.00 +0.0%
metric_labels 3.00 ±0.00 3.00 ±0.00 +0.0%
metric_foreground_pct 14.51 ±0.00 14.51 ±0.00 +0.0%
nii_pad_to 0.62 ±0.01 0.79 ±0.03 +26.3% (noise) 0.000
poi_to_global 0.23 ±0.02 0.17 ±0.01 -26.0% (noise) 0.000
poi_resample_from_to 0.61 ±0.07 0.72 ±0.01 +17.3% (noise) 0.034
nii_get_array 0.05 ±0.00 0.05 ±0.01 -12.9% (noise) 0.016
poi_map_labels 0.19 ±0.02 0.21 ±0.01 +11.3% (noise) 0.175
poi_rescale 0.20 ±0.01 0.18 ±0.01 -8.8% (noise) 0.046
nii_load_seg 2.80 ±0.06 3.03 ±0.04 +8.2% (noise) 0.000
nii_set_dtype 0.54 ±0.03 0.50 ±0.02 -7.5% (noise) 0.054
nii_reorient 0.86 ±0.04 0.92 ±0.01 +6.9% (noise) 0.007
nii_apply_crop 0.72 ±0.05 0.76 ±0.01 +6.4% (noise) 0.033
nii_map_labels 0.94 ±0.01 1.00 ±0.01 +6.0% (noise) 0.000
poi_local_to_global_arr 0.28 ±0.01 0.26 ±0.02 -5.4% (noise) 0.341
nii_volumes 1.94 ±0.02 1.88 ±0.02 -3.2% (noise) 0.001
nii_get_connected_components 2.13 ±0.04 2.07 ±0.26 -2.7% (noise) 0.648
poi_reorient 0.38 ±0.02 0.38 ±0.04 -1.8% (noise) 0.531
poi_calc_centroids 2.63 ±0.03 2.58 ±0.04 -1.8% (noise) 0.033
nii_center_of_masses 1.88 ±0.01 1.84 ±0.02 -1.7% (noise) 0.019
nii_compute_crop 0.34 ±0.02 0.35 ±0.02 +1.5% (noise) 0.919
nii_extract_label 0.45 ±0.02 0.46 ±0.02 +1.4% (noise) 0.821
nii_unique 0.59 ±0.01 0.60 ±0.02 +1.0% (noise) 0.304
poi_save 0.52 ±0.01 0.52 ±0.02 +0.5% (noise) 0.553
poi_load 0.91 ±0.01 0.91 ±0.01 -0.3% (noise) 0.448

ct_2d — shape (73, 47, 1)

Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
nii_rescale 5.61 ±0.18 5.79 ±0.08 +3.3% 0.018
nii_dilate_msk 13.88 ±0.12 14.01 ±0.06 +0.9% 0.027
nii_resample_from_to 7.55 ±0.21 7.61 ±0.23 +0.8% 0.418
metric_voxels 3431.00 ±0.00 3431.00 ±0.00 +0.0%
metric_labels 3.00 ±0.00 3.00 ±0.00 +0.0%
… 30 more measurements
Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
metric_foreground_pct 37.60 ±0.00 37.60 ±0.00 +0.0%
poi_save 0.50 ±0.02 0.57 ±0.02 +14.1% (noise) 0.003
poi_rescale 0.27 ±0.02 0.30 ±0.01 +9.6% (noise) 0.005
poi_to_global 0.26 ±0.03 0.28 ±0.01 +8.5% (noise) 0.522
nii_map_labels 0.52 ±0.02 0.56 ±0.07 +7.1% (noise) 0.245
nii_center_of_masses 0.22 ±0.01 0.23 ±0.01 +6.3% (noise) 0.067
nii_fill_holes 0.84 ±0.02 0.90 ±0.04 +6.3% (noise) 0.168
nii_load_seg 1.72 ±0.03 1.82 ±0.07 +5.9% (noise) 0.088
poi_calc_centroids 0.95 ±0.02 1.00 ±0.06 +5.0% (noise) 0.195
nii_reorient 0.95 ±0.06 0.90 ±0.02 -4.5% (noise) 0.139
poi_resample_from_to 0.74 ±0.02 0.78 ±0.02 +4.4% (noise) 0.029
nii_save 1.44 ±0.04 1.50 ±0.01 +3.9% (noise) 0.004
nii_load_img 1.60 ±0.08 1.54 ±0.09 -3.8% (noise) 0.926
nii_get_connected_components 0.67 ±0.02 0.70 ±0.02 +3.7% (noise) 0.068
nii_extract_label 0.47 ±0.02 0.46 ±0.03 -3.4% (noise) 0.885
nii_apply_crop 0.74 ±0.09 0.77 ±0.02 +3.1% (noise) 0.615
poi_load 1.00 ±0.03 1.03 ±0.05 +3.0% (noise) 0.336
poi_calc_centroids_nocrop 1.14 ±0.04 1.17 ±0.07 +2.9% (noise) 0.363
nii_compute_crop 0.17 ±0.01 0.17 ±0.01 +2.6% (noise) 0.654
nii_rescale_seg 0.84 ±0.03 0.86 ±0.02 +2.1% (noise) 0.079
nii_erode_msk 0.98 ±0.04 0.96 ±0.04 -1.8% (noise) 0.822
nii_unique 0.15 ±0.01 0.15 ±0.01 -1.4% (noise) 0.852
nii_filter_connected_components 0.87 ±0.03 0.88 ±0.03 +1.3% (noise) 0.387
nii_get_array 0.02 ±0.00 0.02 ±0.00 +1.1% (noise) 0.272
nii_volumes 0.32 ±0.01 0.32 ±0.01 +1.0% (noise) 0.513
poi_reorient 0.48 ±0.02 0.47 ±0.01 -0.9% (noise) 0.465
poi_map_labels 0.23 ±0.01 0.23 ±0.01 +0.9% (noise) 0.773
nii_set_dtype 0.46 ±0.22 0.47 ±0.02 +0.5% (noise) 0.338
nii_pad_to 0.62 ±0.03 0.62 ±0.02 +0.4% (noise) 0.491
poi_local_to_global_arr 0.29 ±0.00 0.29 ±0.01 +0.0% (noise) 0.402

mri_3d — shape (68, 52, 67)

Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
nii_fill_holes 5.49 ±0.04 5.63 ±0.15 +2.6% 0.087
nii_filter_connected_components 4.75 ±0.05 4.66 ±0.02 -1.9% 0.026
nii_load_img 9.61 ±0.11 9.73 ±0.23 +1.2% 0.085
nii_dilate_msk 154.81 ±1.33 156.36 ±0.74 +1.0% 0.378
nii_save 9.68 ±0.03 9.58 ±0.16 -1.0% 0.367
… 31 more measurements
Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
poi_calc_centroids_nocrop 9.17 ±0.20 9.11 ±0.10 -0.7% 0.777
nii_rescale 37.86 ±0.31 38.07 ±0.32 +0.6% 0.500
nii_resample_from_to 39.74 ±0.80 39.55 ±0.54 -0.5% 0.609
nii_erode_msk 7.67 ±0.14 7.70 ±0.12 +0.4% 0.391
nii_rescale_seg 3.13 ±0.03 3.14 ±0.06 +0.3% 0.358
poi_calc_poi_from_subreg_vert 10.94 ±0.22 10.92 ±0.16 -0.1% 0.538
metric_voxels 236912.00 ±0.00 236912.00 ±0.00 +0.0%
metric_labels 8.00 ±0.00 8.00 ±0.00 +0.0%
metric_foreground_pct 18.21 ±0.00 18.21 ±0.00 +0.0%
poi_rescale 0.30 ±0.01 0.33 ±0.03 +11.5% (noise) 0.029
poi_save 0.58 ±0.02 0.63 ±0.01 +9.6% (noise) 0.000
nii_map_labels 1.00 ±0.03 1.06 ±0.03 +6.8% (noise) 0.023
nii_extract_label 0.48 ±0.02 0.45 ±0.04 -5.6% (noise) 0.802
poi_local_to_global_arr 0.31 ±0.01 0.30 ±0.01 -5.1% (noise) 0.036
nii_apply_crop 0.75 ±0.35 0.79 ±0.07 +4.7% (noise) 0.560
poi_resample_from_to 0.80 ±0.05 0.84 ±0.06 +4.5% (noise) 0.787
nii_reorient 0.95 ±0.03 0.91 ±0.06 -3.7% (noise) 0.524
poi_map_labels 0.27 ±0.01 0.27 ±0.01 +3.2% (noise) 0.314
nii_set_dtype 0.55 ±0.02 0.57 ±0.01 +3.2% (noise) 0.030
poi_reorient 0.51 ±0.02 0.53 ±0.03 +2.8% (noise) 0.315
poi_to_global 0.30 ±0.01 0.31 ±0.01 +2.5% (noise) 0.333
nii_load_seg 2.93 ±0.08 3.00 ±0.14 +2.4% (noise) 0.319
nii_pad_to 0.75 ±0.03 0.76 ±0.23 +1.7% (noise) 0.359
poi_calc_centroids 2.86 ±0.05 2.91 ±0.05 +1.5% (noise) 0.513
poi_load 2.16 ±0.01 2.19 ±0.02 +1.5% (noise) 0.014
nii_volumes 2.03 ±0.03 2.06 ±0.08 +1.4% (noise) 0.271
nii_compute_crop 0.36 ±0.01 0.36 ±0.02 -1.3% (noise) 0.954
nii_get_connected_components 2.12 ±0.05 2.14 ±0.03 +1.0% (noise) 0.385
nii_center_of_masses 2.10 ±0.02 2.08 ±0.02 -0.7% (noise) 0.886
nii_get_array 0.06 ±0.00 0.06 ±0.00 +0.4% (noise) 0.272
nii_unique 0.63 ±0.01 0.63 ±0.02 -0.3% (noise) 0.940

mri_2d — shape (68, 52, 1)

Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
nii_rescale 5.67 ±0.04 5.52 ±0.13 -2.8% 0.049
nii_dilate_msk 18.25 ±0.20 18.40 ±0.14 +0.9% 0.108
nii_resample_from_to 7.46 ±0.08 7.43 ±0.13 -0.3% 0.870
metric_voxels 3536.00 ±0.00 3536.00 ±0.00 +0.0%
metric_labels 7.00 ±0.00 7.00 ±0.00 +0.0%
… 30 more measurements
Measurement baseline ms (median ±½·range) head ms (median ±½·range) Δ % p
metric_foreground_pct 50.17 ±0.00 50.17 ±0.00 +0.0%
nii_get_array 0.02 ±0.00 0.02 ±0.00 +22.9% (noise) 0.247
poi_save 0.60 ±0.02 0.67 ±0.34 +12.6% (noise) 0.287
poi_to_global 0.28 ±0.02 0.32 ±0.01 +12.5% (noise) 0.024
nii_extract_label 0.43 ±0.02 0.49 ±0.03 +12.4% (noise) 0.020
nii_save 1.39 ±0.03 1.50 ±0.05 +8.0% (noise) 0.008
nii_get_connected_components 0.67 ±0.01 0.72 ±0.03 +7.8% (noise) 0.014
nii_pad_to 0.60 ±0.02 0.64 ±0.02 +6.8% (noise) 0.078
nii_filter_connected_components 0.86 ±0.03 0.92 ±0.02 +6.4% (noise) 0.006
poi_reorient 0.49 ±0.01 0.52 ±0.03 +5.8% (noise) 0.133
nii_fill_holes 1.07 ±0.03 1.13 ±0.13 +5.6% (noise) 0.136
nii_set_dtype 0.45 ±0.02 0.43 ±0.05 -5.1% (noise) 0.739
nii_reorient 0.84 ±0.03 0.88 ±0.06 +5.1% (noise) 0.370
nii_load_img 1.55 ±0.06 1.47 ±0.05 -4.9% (noise) 0.128
nii_erode_msk 1.17 ±0.02 1.23 ±0.04 +4.6% (noise) 0.029
nii_apply_crop 0.69 ±0.03 0.72 ±0.04 +4.4% (noise) 0.118
poi_rescale 0.30 ±0.01 0.32 ±0.02 +4.3% (noise) 0.137
poi_local_to_global_arr 0.29 ±0.01 0.30 ±0.01 +4.2% (noise) 0.143
nii_center_of_masses 0.41 ±0.01 0.42 ±0.01 +3.4% (noise) 0.177
poi_resample_from_to 0.79 ±0.03 0.82 ±0.02 +3.3% (noise) 0.427
nii_load_seg 1.69 ±0.04 1.75 ±0.08 +3.1% (noise) 0.262
nii_unique 0.14 ±0.01 0.14 ±0.01 -3.0% (noise) 0.724
poi_map_labels 0.26 ±0.01 0.26 ±0.01 -2.5% (noise) 0.919
nii_map_labels 0.55 ±0.03 0.56 ±0.02 +2.5% (noise) 0.620
poi_calc_centroids 1.17 ±0.03 1.19 ±0.06 +2.1% (noise) 0.445
poi_load 1.92 ±0.03 1.88 ±0.45 -1.8% (noise) 0.379
poi_calc_centroids_nocrop 1.41 ±0.07 1.43 ±0.05 +1.7% (noise) 0.153
nii_compute_crop 0.15 ±0.01 0.16 ±0.01 +0.9% (noise) 0.517
nii_volumes 0.48 ±0.01 0.47 ±0.02 -0.5% (noise) 0.675
nii_rescale_seg 0.84 ±0.04 0.85 ±0.04 +0.1% (noise) 0.986

Gate: a measurement fails when the baseline is ≥ 1 ms, the median grows by ≥ 50%, and Welch's t-test gives p < 0.05. metric_* rows are context only.

Memory (peak RSS growth per call)

baseline 8479ec9 vs head 8479ec9 · python 3.11.16 · 5 repeats + 1 warmup · sampler proc-status, isolation fork · measurement floor ≈ 0.90 MiB

Showing the 5 most-changed measurements per case; the rest are collapsed. Rows with a baseline below 3 MiB are tagged (noise) — runner jitter on those swamps any real change.

ct_3d — shape (73, 47, 73)

Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_rescale_seg 5.95 ±0.00 5.92 ±0.00 -0.4%
nii_rescale 6.17 ±0.00 6.15 ±0.00 -0.4%
nii_resample_from_to 6.30 ±0.00 6.27 ±0.00 -0.4%
nii_erode_msk 5.91 ±0.00 5.93 ±0.00 +0.3%
nii_set_dtype 5.21 ±0.00 5.23 ±0.00 +0.3%
… 31 more measurements
Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
poi_resample_from_to 5.25 ±0.00 5.26 ±0.00 +0.3%
nii_extract_label 5.34 ±0.00 5.35 ±0.00 +0.3%
nii_pad_to 5.39 ±0.00 5.41 ±0.00 +0.3%
nii_map_labels 5.46 ±0.00 5.48 ±0.00 +0.3%
nii_apply_crop 5.84 ±0.00 5.85 ±0.00 +0.3%
nii_reorient 5.88 ±0.00 5.89 ±0.00 +0.3%
poi_calc_centroids_nocrop 5.89 ±0.00 5.91 ±0.00 +0.3%
nii_dilate_msk 5.90 ±0.00 5.91 ±0.00 +0.3%
nii_load_seg 5.98 ±0.00 5.99 ±0.00 +0.3%
poi_calc_centroids 6.02 ±0.00 6.04 ±0.00 +0.3%
nii_get_connected_components 6.59 ±0.00 6.60 ±0.00 +0.2%
nii_filter_connected_components 6.84 ±0.00 6.85 ±0.00 +0.2%
nii_fill_holes 6.25 ±0.00 6.27 ±0.00 +0.2%
poi_calc_poi_from_subreg_vert 7.09 ±0.00 7.10 ±0.00 +0.2%
nii_load_img 3.56 ±0.00 3.56 ±0.00 +0.0%
nii_save 3.71 ±0.00 3.71 ±0.00 +0.0%
nii_volumes 3.52 ±0.00 3.52 ±0.00 +0.0%
nii_center_of_masses 3.27 ±0.00 3.27 ±0.00 +0.0%
poi_reorient 3.83 ±0.00 3.83 ±0.00 +0.0%
poi_to_global 3.08 ±0.00 3.08 ±0.00 +0.0%
metric_voxels 250463.00 ±0.00 250463.00 ±0.00 +0.0%
metric_labels 3.00 ±0.00 3.00 ±0.00 +0.0%
metric_foreground_pct 14.51 ±0.00 14.51 ±0.00 +0.0%
nii_get_array 1.65 ±0.00 1.65 ±0.00 +0.0% (noise)
nii_compute_crop 2.90 ±0.00 2.90 ±0.00 +0.0% (noise)
nii_unique 2.96 ±0.00 2.96 ±0.00 +0.0% (noise)
poi_rescale 2.61 ±0.00 2.61 ±0.00 +0.0% (noise)
poi_local_to_global_arr 2.96 ±0.00 2.96 ±0.00 +0.0% (noise)
poi_save 1.40 ±0.00 1.40 ±0.00 +0.0% (noise)
poi_map_labels 1.77 ±0.00 1.77 ±0.00 +0.0% (noise)
poi_load 1.61 ±0.00 1.61 ±0.00 +0.0% (noise)

ct_2d — shape (73, 47, 1)

Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_rescale_seg 5.88 ±0.00 5.86 ±0.00 -0.4%
nii_rescale 6.11 ±0.00 6.09 ±0.00 -0.4%
nii_resample_from_to 6.23 ±0.00 6.21 ±0.00 -0.4%
nii_erode_msk 5.85 ±0.00 5.87 ±0.00 +0.3%
nii_set_dtype 5.15 ±0.00 5.16 ±0.00 +0.3%
… 30 more measurements
Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
poi_resample_from_to 5.18 ±0.00 5.20 ±0.00 +0.3%
nii_extract_label 5.27 ±0.00 5.29 ±0.00 +0.3%
nii_pad_to 5.33 ±0.00 5.35 ±0.00 +0.3%
nii_map_labels 5.40 ±0.00 5.41 ±0.00 +0.3%
nii_apply_crop 5.77 ±0.00 5.79 ±0.00 +0.3%
nii_reorient 5.81 ±0.00 5.83 ±0.00 +0.3%
nii_dilate_msk 5.84 ±0.00 5.85 ±0.00 +0.3%
poi_calc_centroids_nocrop 5.89 ±0.00 5.91 ±0.00 +0.3%
nii_load_seg 5.91 ±0.00 5.93 ±0.00 +0.3%
poi_calc_centroids 5.96 ±0.00 5.98 ±0.00 +0.3%
nii_get_connected_components 6.52 ±0.00 6.54 ±0.00 +0.2%
nii_filter_connected_components 6.77 ±0.00 6.79 ±0.00 +0.2%
nii_fill_holes 6.19 ±0.00 6.20 ±0.00 +0.2%
nii_load_img 3.50 ±0.00 3.50 ±0.00 +0.0%
nii_save 3.65 ±0.00 3.65 ±0.00 +0.0%
nii_volumes 3.46 ±0.00 3.46 ±0.00 +0.0%
nii_center_of_masses 3.21 ±0.00 3.21 ±0.00 +0.0%
poi_reorient 3.77 ±0.00 3.77 ±0.00 +0.0%
poi_to_global 3.02 ±0.00 3.02 ±0.00 +0.0%
metric_voxels 3431.00 ±0.00 3431.00 ±0.00 +0.0%
metric_labels 3.00 ±0.00 3.00 ±0.00 +0.0%
metric_foreground_pct 37.60 ±0.00 37.60 ±0.00 +0.0%
nii_get_array 1.59 ±0.00 1.59 ±0.00 +0.0% (noise)
nii_compute_crop 2.84 ±0.00 2.84 ±0.00 +0.0% (noise)
nii_unique 2.90 ±0.00 2.90 ±0.00 +0.0% (noise)
poi_rescale 2.54 ±0.00 2.54 ±0.00 +0.0% (noise)
poi_local_to_global_arr 2.89 ±0.00 2.89 ±0.00 +0.0% (noise)
poi_save 1.34 ±0.00 1.34 ±0.00 +0.0% (noise)
poi_map_labels 1.71 ±0.00 1.71 ±0.00 +0.0% (noise)
poi_load 1.55 ±0.00 1.55 ±0.00 +0.0% (noise)

mri_3d — shape (68, 52, 67)

Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_rescale_seg 5.88 ±0.00 5.86 ±0.00 -0.4%
nii_rescale 6.11 ±0.00 6.09 ±0.00 -0.4%
nii_resample_from_to 6.23 ±0.00 6.21 ±0.00 -0.4%
nii_erode_msk 5.85 ±0.00 5.87 ±0.00 +0.3%
poi_resample_from_to 5.18 ±0.00 5.20 ±0.00 +0.3%
… 31 more measurements
Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_set_dtype 5.21 ±0.00 5.23 ±0.00 +0.3%
nii_extract_label 5.27 ±0.00 5.29 ±0.00 +0.3%
nii_pad_to 5.33 ±0.00 5.35 ±0.00 +0.3%
nii_map_labels 5.40 ±0.00 5.41 ±0.00 +0.3%
nii_apply_crop 5.77 ±0.00 5.79 ±0.00 +0.3%
nii_reorient 5.81 ±0.00 5.83 ±0.00 +0.3%
poi_calc_centroids_nocrop 5.83 ±0.00 5.85 ±0.00 +0.3%
nii_dilate_msk 5.84 ±0.00 5.85 ±0.00 +0.3%
nii_load_seg 5.91 ±0.00 5.93 ±0.00 +0.3%
poi_calc_centroids 5.96 ±0.00 5.98 ±0.00 +0.3%
nii_get_connected_components 6.52 ±0.00 6.54 ±0.00 +0.2%
nii_filter_connected_components 6.77 ±0.00 6.79 ±0.00 +0.2%
poi_calc_poi_from_subreg_vert 7.08 ±0.00 7.10 ±0.00 +0.2%
nii_fill_holes 6.19 ±0.00 6.20 ±0.00 +0.2%
nii_load_img 3.56 ±0.00 3.56 ±0.00 +0.0%
nii_save 3.65 ±0.00 3.65 ±0.00 +0.0%
nii_volumes 3.46 ±0.00 3.46 ±0.00 +0.0%
nii_center_of_masses 3.21 ±0.00 3.21 ±0.00 +0.0%
poi_reorient 3.77 ±0.00 3.77 ±0.00 +0.0%
poi_to_global 3.02 ±0.00 3.02 ±0.00 +0.0%
metric_voxels 236912.00 ±0.00 236912.00 ±0.00 +0.0%
metric_labels 8.00 ±0.00 8.00 ±0.00 +0.0%
metric_foreground_pct 18.21 ±0.00 18.21 ±0.00 +0.0%
nii_get_array 1.59 ±0.00 1.59 ±0.00 +0.0% (noise)
nii_compute_crop 2.84 ±0.00 2.84 ±0.00 +0.0% (noise)
nii_unique 2.90 ±0.00 2.90 ±0.00 +0.0% (noise)
poi_rescale 2.54 ±0.00 2.54 ±0.00 +0.0% (noise)
poi_local_to_global_arr 2.89 ±0.00 2.89 ±0.00 +0.0% (noise)
poi_save 1.40 ±0.00 1.40 ±0.00 +0.0% (noise)
poi_map_labels 1.71 ±0.00 1.71 ±0.00 +0.0% (noise)
poi_load 1.55 ±0.00 1.55 ±0.00 +0.0% (noise)

mri_2d — shape (68, 52, 1)

Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_rescale_seg 5.88 ±0.00 5.86 ±0.00 -0.4%
nii_rescale 6.11 ±0.00 6.09 ±0.00 -0.4%
nii_resample_from_to 6.23 ±0.00 6.21 ±0.00 -0.4%
nii_erode_msk 5.85 ±0.00 5.87 ±0.00 +0.3%
poi_resample_from_to 5.18 ±0.00 5.20 ±0.00 +0.3%
… 30 more measurements
Measurement baseline MiB (median ±½·range) head MiB (median ±½·range) Δ % p
nii_set_dtype 5.21 ±0.00 5.23 ±0.00 +0.3%
nii_extract_label 5.27 ±0.00 5.29 ±0.00 +0.3%
nii_pad_to 5.33 ±0.00 5.35 ±0.00 +0.3%
nii_map_labels 5.40 ±0.00 5.41 ±0.00 +0.3%
nii_apply_crop 5.77 ±0.00 5.79 ±0.00 +0.3%
nii_reorient 5.81 ±0.00 5.83 ±0.00 +0.3%
nii_dilate_msk 5.84 ±0.00 5.85 ±0.00 +0.3%
poi_calc_centroids_nocrop 5.89 ±0.00 5.91 ±0.00 +0.3%
nii_load_seg 5.91 ±0.00 5.93 ±0.00 +0.3%
poi_calc_centroids 5.96 ±0.00 5.98 ±0.00 +0.3%
nii_get_connected_components 6.52 ±0.00 6.54 ±0.00 +0.2%
nii_filter_connected_components 6.77 ±0.00 6.79 ±0.00 +0.2%
nii_fill_holes 6.19 ±0.00 6.20 ±0.00 +0.2%
nii_load_img 3.56 ±0.00 3.56 ±0.00 +0.0%
nii_save 3.65 ±0.00 3.65 ±0.00 +0.0%
nii_volumes 3.46 ±0.00 3.46 ±0.00 +0.0%
nii_center_of_masses 3.21 ±0.00 3.21 ±0.00 +0.0%
poi_reorient 3.77 ±0.00 3.77 ±0.00 +0.0%
poi_to_global 3.02 ±0.00 3.02 ±0.00 +0.0%
metric_voxels 3536.00 ±0.00 3536.00 ±0.00 +0.0%
metric_labels 7.00 ±0.00 7.00 ±0.00 +0.0%
metric_foreground_pct 50.17 ±0.00 50.17 ±0.00 +0.0%
nii_get_array 1.59 ±0.00 1.59 ±0.00 +0.0% (noise)
nii_compute_crop 2.84 ±0.00 2.84 ±0.00 +0.0% (noise)
nii_unique 2.90 ±0.00 2.90 ±0.00 +0.0% (noise)
poi_rescale 2.54 ±0.00 2.54 ±0.00 +0.0% (noise)
poi_local_to_global_arr 2.89 ±0.00 2.89 ±0.00 +0.0% (noise)
poi_save 1.40 ±0.00 1.40 ±0.00 +0.0% (noise)
poi_map_labels 1.71 ±0.00 1.71 ±0.00 +0.0% (noise)
poi_load 1.55 ±0.00 1.55 ±0.00 +0.0% (noise)

Gate: a measurement fails when the baseline is ≥ 1 MiB, the median grows by ≥ 50%, and Welch's t-test gives p < 0.05. metric_* rows are context only.

@Hendrik-code
Hendrik-code merged commit 90173c9 into main Sep 2, 2026
6 checks passed
@Hendrik-code
Hendrik-code deleted the debug branch September 2, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request speed/mem Changes that improve speed/memory of code execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants