-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add Array sizes up to 5000 (some of which are required for NTRU-Prime) #79
Conversation
51addcb
to
cb2b5f8
Compare
222ccef
to
d1eda9c
Compare
This is better practice in general Signed-off-by: Ahmed <>
Signed-off-by: Ahmed <>
Signed-off-by: Ahmed <>
Signed-off-by: Ahmed <>
First modules are disabled for some reason and it is not clear why Second we replaced .map(Clone::clone) with .cloned() Last we removed uncessary .into_iter() Signed-off-by: Ahmed <>
@tarcieri I propose slightly different thing from the original PR, I modified the patch to include numbers up to 5000. This version takes 9 seconds to compile on my laptop which is not that bad. If later someone complains and need faster compile time we can split the ranges into smaller feature flags? One thing that might require a deep look is this line. I am no sure why is it there Last but not least, I am not sure what tests are failing. This is the view I see If you have no objection, I would consider this patch ready to merge |
@@ -0,0 +1,26 @@ | |||
start = 1025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use non-Rust languages for codegen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted! I will try to rework something with proc-macros
@oddcoder that seems really slow to me. What's the relative change in compilation time as a percentage? |
Percentage wise, it is bad, almost 13X. However, we are talking about few seconds. So it shouldn't be that bad waiting for it to build. The problem is for NTRU I need 18 constants between |
@oddcoder could you try adding only the sizes you need for NTRU? If that's too onerous, we can consider feature-gating various sizes in batches |
Closing this as causing too much of an adverse effect on compile times. #81 might be nice for pluggable sizes, but for now I would suggest submitting another PR with exactly the sizes you need. |
@tarcieri appologies for the long delay, got some busy weeks. I prototype a solution with feature flags. But it is abit too intrusive, so instead I will split it into smaller PRs each can be reviewed separately. The idea is is to use proc macros to improve felxibility but once we have proc macrs, some macros can be done nicer..... if you wouldn't mind, I can send smaller prs improving some of the stuff (like moving |
I would prefer to avoid proc macros in codegen, and just check in the generated files, so long as they have Rust code to generate them. But also, I would like to get a stable release of |
so my idea for proc macro is few things: if can reconsider this, I can send series of patches very very quickly, since I kinda have prototype, I just need to test split things into meaningful commit. If not, I can rework the python script to something in rust, But I feel it is a bit hacky. |
Compile time, simplicity, and maintaining our current status of having zero hard dependencies matter a lot more than ergonomics for the implementation of |
I would kindly ask you to wait and not merge this until I am 100% sure I will not need more sizes (When NTRU patch is ready).
Best