I feel very tempted to ask if I could make it so that Cython could actually support multidict rather than just simply importing it since I feel that performance may steadily improve if this approach was implemented. This way instead of calling import multidict we could do something like cimport multidict I would assume that doing so would allow the following things in aiohttp to run a bit faster.
- The
_http_writer.pyx Cython Code could have direct access to istr as a physical CPython Type allowing this check to be a little bit smoother.
- As for
_http_parser.pyx this could be pretty significant as many of the multidict calls could be replaced for C-API Calls.
Approach For Compiling
- As for compiling I'm looking to try and approach this the same way numpy would where a call like
_import_array() could be implemented to import the Capsule.
- There could be an extra module that is specifically responsible for finding the header files at compile-time so that users who want to use multidict within cython can easily compile their code alongside with it.
If anybody is confused about what a capsule is I have a link to it's documentation
I feel very tempted to ask if I could make it so that Cython could actually support multidict rather than just simply importing it since I feel that performance may steadily improve if this approach was implemented. This way instead of calling
import multidictwe could do something likecimport multidictI would assume that doing so would allow the following things in aiohttp to run a bit faster._http_writer.pyxCython Code could have direct access to istr as a physical CPython Type allowing this check to be a little bit smoother._http_parser.pyxthis could be pretty significant as many of themultidictcalls could be replaced for C-API Calls.Approach For Compiling
_import_array()could be implemented to import the Capsule.If anybody is confused about what a capsule is I have a link to it's documentation