Repository navigation
Conversation
| class Py_Is(Operation): | ||
| NAME = "Py_Is" | ||
|
|
||
| def replace2(regs): |
Check notice
Code scanning / CodeQL
First parameter of a method is not named 'self'
| # FIXME: add macro after the first header comment | ||
| # FIXME: add macro after includes | ||
| # FIXME: add macro after: #define PY_SSIZE_T_CLEAN | ||
| return line + "\n" + content |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns
| encoding = "utf-8" | ||
| errors = "surrogateescape" | ||
|
|
||
| with open(filename, encoding=encoding, errors=errors) as fp: |
Check notice
Code scanning / CodeQL
Empty except
|
Personally, I don't think we should be writing anything new in C. We should be using Cython or Rust. But, I'll leave this to bdraco to decide where the project should go. |
|
I think we should only consider C if we can see a 50% or better speed up |
|
@bdraco I'm going to close this PR and maybe see about rewriting the C Code based on some new stuff we've been up to since now we're playing with Cython Refs which can be both a blessing and a curse. |
What do these changes do?
I moved Propcache to C out of pure boredom/inspiration from having worked a bit on the multidict project for a time so I felt a little bit confident that I could at least pull this off as an outlined plan for optimizing propcache's properties a bit further.
This however is a rough-draft/blue-print idea and like all should be treated as one. I do not expect to do anything with it for the time being and you should treat it as experimental until I am ready to actually begin merging it to it and start replacing the cython script in favor of it.
We will need to add clang-format to pre-commit before we wish to proceed with this large change and I don't expect for this to be implemented until after 0.3.3 has been rolled out.
Edit: Please know that I am a little bit unskilled with writing CPython all by myself so this rough draft might have a few hiccups in the C Code.
Are there changes in behavior for the user?
Should be a little bit more performance now that
NULLcould be utilized a bit elsewhere. I doubt anyone is going to want a C-API Capsule like I and avetlov are doing to multidict so there may not be a need for one (unless cython starts supporting stuff like it which would be an extremely rare case scenario, incase I made it so that true means success and false indicates failure in a few places in the main header filepc.h).Related issue number
Checklist