Skip to content

Exposing asynciomodule.c's internal CPython Objects to Cython to improve performance. #57

@Vizonex

Description

@Vizonex

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.

Metadata

Metadata

Assignees

Labels

deviates-from-uvloopPR or Issue deviates from Magicstack/uvloop to make something betterenhancementNew feature or requesthelp wantedExtra attention is neededinternal-refactoringTechnique for restructuring an existing body of code, without changing its external behavior.questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions