-
Notifications
You must be signed in to change notification settings - Fork 6
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
upgrade changed struct fields, cvt values, use NT for field_info #41
base: master
Are you sure you want to change the base?
Conversation
Hmm -- slight change to the type handling. Will push shortly... Also need to add some updating test cases |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #41 +/- ##
==========================================
- Coverage 97.50% 88.13% -9.37%
==========================================
Files 2 2
Lines 120 236 +116
==========================================
+ Hits 117 208 +91
- Misses 3 28 +25 ☔ View full report in Codecov by Sentry. |
Not sure why the nightly version of Julia makes so many methods with the same signature but it's the only oddball. I cased-out those method checks for 1.11. |
Can you check what the performance implication of this are? Doing an update before every operation seems quite costly to me. |
Update just indirects through a ref, does a Dict lookup, and compares ints
to check for changes and proceeds of there are none.
I'm happy to reduce overhead by using a shared ref for each struct's world
counter if you would prefer. That would remove the Dict lookup.
…On Thu, Jul 18, 2024, 6:47 AM Simon Christ ***@***.***> wrote:
Can you check what the performance implication of this are? Doing an
update before every operation seems quite costly to me.
—
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGQKNISL4G6INIZMFC54LZM6MNBAVCNFSM6AAAAABK7XLATOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGE4TQMJXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Its really hard to make a judgement without having some numbers to compare |
Honestly I didn't really consider performance because I imagined using Since it's a concern I think I'll make it an option. I can add something like |
Thats true and its fine to be slower than normal structs, my concern is just to not make code using ProtoStructs unreasonable slow, at some point you wouldn't use it otherwise. |
Well, a friend mentioned that since people use Julia for intense computation like solvers, a significant slowdown during prototyping might have a large impact as well. Since I changed the structs to morph, they're no longer type stable and that could seriously impact tight loop performance -- I had to remove the NT from the type parameters. So I think it's better just to keep If someone only wants to use |
Fixes #40
This PR removes / adds / converts fields in existing structs when the struct definition changes. It does this by
properties
to be a ref so it can be reassignedupdateproto
call at the top of the generated methods to check for updates based on the world fieldAlso, this adds type conversion to the generated constructors.