ska-sa / spead2

Library for the Streaming Protocol for Exchange of Astronomical Data (SPEAD)
http://spead2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
23 stars 14 forks source link

Simplify wrapping of pointers to members #266

Closed bmerry closed 1 year ago

bmerry commented 1 year ago

I did some microbenching and found no evidence that the SPEAD2_PTMF wrapper was improving performance at all, compared to just passing the pointer-to-member-function to pybind11, even though the latter involves making a call via a pointer (bad for branch prediction). So I've eliminated the SPEAD2_PTMF macro entirely, and simplified SPEAD2_PTMF_VOID to use a more obvious approach. The latter also isn't needed for any const member functions so I eliminated that support too.

bmerry commented 1 year ago

@sjperkins I don't seem to be able to assign to you, but would you mind giving this a quick look?

sjperkins commented 1 year ago

Looks good to me

bmerry commented 1 year ago

Thanks for reviewing.