dfm / nufft-ls

Benchmarking LS periodogram implementations
Apache License 2.0
4 stars 0 forks source link

Adding some logic to handle different platforms and compilers #3

Closed dfm closed 2 years ago

dfm commented 2 years ago

This adds some generally untested logic based on @lgarrison's suggested compiler flags that tries to set them sensibly based on the environment.

Here are the results I get when running the benchmark on my M1 apple laptop:

Running with N=3554, M=100000, dtype float64
baseline took 5.052 sec
astropy took 11.71 sec
frac isclose 100%
max frac err 3.865e-09
lgarrison commented 2 years ago

Thanks, this is great! I knew there must be a right way to organize this, but I wasn't sure what it was.

I think in the end most/all of the commented-out flags ended up not helping (or even hurting, in the case of -funroll-loops), but I will double check this. Need to un-break my environment first...

Also I see you noticed I mashed together the cflags and ldflags like a Bad Programmer 😅

dfm commented 2 years ago

LGTM!