Skip to content

Make mapcoord_threaded faster#275

Open
AlexKurek wants to merge 2 commits into
lofar-astron:masterfrom
AlexKurek:Make-`mapcoord_threaded`-faster
Open

Make mapcoord_threaded faster#275
AlexKurek wants to merge 2 commits into
lofar-astron:masterfrom
AlexKurek:Make-`mapcoord_threaded`-faster

Conversation

@AlexKurek
Copy link
Copy Markdown
Contributor

@AlexKurek AlexKurek commented May 3, 2026

I have benchmarked map_2d, as this is where mapcoord_threaded is called from.

before:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       10    0.786    0.079  105.040   10.504 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:584(map_2d)

after:

       10    0.699    0.070   40.033    4.003 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:586(map_2d)
       10    0.707    0.071   39.698    3.970 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:609(map_2d)
       10    0.659    0.066   39.970    3.997 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:604(map_2d)

The entire run on the Xeon 6238R is faster by ~15%. gaul files are identical.

@AlexKurek
Copy link
Copy Markdown
Contributor Author

AlexKurek commented May 8, 2026

02609bb makes it a bit faster again:

       10    0.668    0.067   35.813    3.581 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:624(map_2d)
       10    0.642    0.064   35.967    3.597 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:624(map_2d)

.gaul files remain identical.

EDIT:
For a larger, 1.5 GB image the entire run is ~9.6% faster:

before: PyBDSF running time: 0:41:0
        8    5.769    0.721  438.971   54.871 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:584(map_2d)
after:  PyBDSF running time: 0:37:4
        8    3.958    0.495  260.992   32.624 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/rmsimage.py:629(map_2d)

.gaul files still remain identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant