Skip to content

Make gaus_2d faster (2)#274

Open
AlexKurek wants to merge 2 commits intolofar-astron:masterfrom
AlexKurek:Make-gaus_2d-faster-(2)
Open

Make gaus_2d faster (2)#274
AlexKurek wants to merge 2 commits intolofar-astron:masterfrom
AlexKurek:Make-gaus_2d-faster-(2)

Conversation

@AlexKurek
Copy link
Copy Markdown
Contributor

before (but after #273)

    10935    0.200    0.000    0.204    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10935    0.205    0.000    0.208    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10935    0.222    0.000    0.226    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10935    0.196    0.000    0.200    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)

after:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    10322    0.173    0.000    0.177    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10322    0.167    0.000    0.171    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10322    0.167    0.000    0.171    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10322    0.167    0.000    0.172    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)
    10322    0.165    0.000    0.169    0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)

~18,4% faster. A lot is done in place now. I think this is now as fast as it gets.
There are very rare differences in the .gaul file at 13th decimal place, but this is normal.

@AlexKurek
Copy link
Copy Markdown
Contributor Author

After 291f1e0 it gets faster by another ~24% :
10322 0.128 0.000 0.153 0.000 /home/akurek/miniconda3/envs/pybdsf-313_local_temp/lib/python3.13/site-packages/bdsf/functions.py:202(gaus_2d)

The .gaul file is OK.

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