-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplifing dependencies/maintenance by removing RCP
types
#2050
Comments
I think the corresponding equivalent is |
Possibly? I'm not very familiar with the boost smart pointer library but I did see |
As @isuruf mentions the RCP is implemented as an intrusive shared pointer rather than an |
I have a branch where I started to add yet another RCP type (which would solve problems with reference counting when interacting from the python bindings). I haven't gotten around to reviving that work, but I hope to in the future. |
Is there a large performance hit from using Switching to a standard library implementation would decrease maintenance and possibly avoid reference counting issues from Python bindings. cppyy seems like it has out of the box support: |
I'm not convinced switching to |
Feel free to close this as it seems that there isn't much interest in switching over to standard library types. However I do think think it would reduce the need to debug issues such as #2048, |
I have only anecdotal numbers for the speedup of using intrusive reference counting. Around 10-20% faster for every reference increase or decrease (because of one less indirection) and as much as 50% faster for creation (due to one less heap allocation). Since symengine do so many creations and reference count incs/decs this would add up. Of course this has to be benchmarked properly to be certain. I am not entirely sure but I think the constant expression context issue should not be applicable to the intrusive counter since it is not needing a separate heap allocation, so it will be similar to |
Would this project welcome a PR that replaces all
RCP
implementations withstd::shared_ptr
(and possibly allowing this to be swapped out withboost::local_shared_ptr
)?The text was updated successfully, but these errors were encountered: