OP has an open pull request on his repo[0] where someone made basically this same change (different names for the variables, but same idea).
According to OP, he tried this but it resulted in slower execution for him. I'm not sure he really followed what that PR says. In the case of the submitter, it says on their machine it gave a 2x speedup (smaller than my ~7x, but still significant).
According to OP, he tried this but it resulted in slower execution for him. I'm not sure he really followed what that PR says. In the case of the submitter, it says on their machine it gave a 2x speedup (smaller than my ~7x, but still significant).
[0] https://github.com/00sapo/cython_list_test/pull/3