Exposing asynciomodule.c's internal CPython Objects to Cython to improve performance.
@Vizonex is already working on this.
Since Jul 20, 2025.
- Dominant language
- Python
- Stars
- 231
- Forks
- 24
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 3
Description
For over a month now I was thinking of ways to improve our library and one Idea I had was to implement a way to expose cpython's internal _asynciomodule.c datatypes such as Task and Future so that the performance of our library will increase. The same could be done with uvloop and is not limited to us. An example of this kind of Exposure to Cython that I am referring to comes from this implementation to expose the CPython array.array type which is noted as being a "Hard-coded utility code hack." This way when libuv performs a callback from a handle that sets a future it will run as smooth as possible with minimal to zero python interactions. I am posting about it as an issue incase others wish to disagree or argue for or against this idea. Like I said this could be done to uvloop as well even though we might beat them to it and I could see a 20% performance increase if were extremely lucky.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.