-
Notifications
You must be signed in to change notification settings - Fork 3
Use NonZero in MixedUnit for C strings #15
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
base: main
Are you sure you want to change the base?
Conversation
5507227
to
c22125e
Compare
New bench after rebase, still regressing (on ARM):
|
Seems to be a result of inlining decisions by the compiler, as sprinkling |
Should we try to add some |
Yes, I have something in the works... :D |
849c0aa
to
02622e1
Compare
Now uses inline, but main branch does as well (aarch64):
|
And x86-64:
|
Today's nightly (28f1c8079 2025-06-24) bench rerun (aarch64):
Some things to notice:
|
Today's nightly (28f1c8079 2025-06-24) bench rerun (amd64):
Some things to notice:
|
In conclusion it seems that the perf impact of this change is largely neutral. |
Should we close it then? |
Well, the main reason to do it is to give more guarantees for C strings, which cannot contain nulls. This change makes this guaranteed by the type system. So as perf looks neutral, I think we should do it. |
Oh my bad, thought it was about performance. Then seems all good if perf are not negatively impacted. 👍 Please just fix the CI and then seems all good to me. |
|
Which use cases require stable support? |
None as far as I know but considering it's a public crate and that 1.89 will be released in less than 3 months, I suppose we can just wait? |
Sure waiting is one options, and given 1.88 is around the corner, it should only be about 6 weeks. Possible alternatives:
|
MSRV is working well nowadays with cargo as it prevents to update to a newer version if MSRV is incompatible. So raising MSRV to 1.89 once it's out seems like the best idea to me. |
c3730e8
to
6bd7251
Compare
I added the MSRV, which should cause cargo to emit an error against lower versions. I would expect to see that reflected in the stable-checks CI here, but I don't... because I failed to actually push the right change. Now produces:
not sure why three times... |
6bd7251
to
da1db27
Compare
@GuillaumeGomez will anyone be disadvantaged if we were to do a release with this change right now? If MSRV is well supported now, then presumably no-one is disadvantaged? |
Well, we still need 1.89 to be released. So just 6 more weeks to wait and then we can do a release. However, we can already release the latest changes you made which improved performance if you want? |
Make C strings safer, by encoding the absence of nulls in the type system. This is made possible by rust-lang/rust#141001 which should hit stable in 1.89.
Seems to be a big regression as written (on ARM):