Great job Xingyu! And happy to read that you are planning to contribute more.
On 30.08.2021, at 20:37, Ralf Gommers <ralf.gommers@gmail.com> wrote:
One of the main take-aways we learned recently was that we should use Pythran to accelerate the private part of a function, but leave the public signature and input validation in Python. This is something that wasn't obvious at the start of Xingyu's project, and we'll need to make sure we do that also for already-merged PRs (for consistently, and possibly to fix some undetected corner case bugs in master) before branching off 1.8.x. Other than that I think we are still pretty happy with Pythran; it gives us fast performance that's easier to obtain than with Cython.
Ok, then I understand from this that we should do Pythran over Cython for new code. Just a thought. If we are going this road, it looks like we could have a Python API and a Pythran/(Cython) API. A user could then decide to skip the validation like that. Having the same signature would be less of a work in terms of doc as we could just add a note in the Python function about the existence of a Pythran version. Or we allow differences and clearly state that this API is not as strict as the Python API. Cheers, Pamphile