Skip to content
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

Optimize ecdsa #14162

Merged
merged 2 commits into from Jul 16, 2023
Merged

Optimize ecdsa #14162

merged 2 commits into from Jul 16, 2023

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Jul 9, 2023

Improves #14161

Old: Package installation took 212.59543 seconds
New: Package installation took  ? seconds

@Megamouse Megamouse added the Optimization Optimizes existing code label Jul 9, 2023
rpcs3/Crypto/ec.cpp Outdated Show resolved Hide resolved
rpcs3/Crypto/ec.cpp Outdated Show resolved Hide resolved
rpcs3/Crypto/ec.cpp Outdated Show resolved Hide resolved
@Megamouse Megamouse force-pushed the testas branch 2 times, most recently from 846ec61 to 8a4bc3e Compare July 9, 2023 11:11
@Megamouse
Copy link
Contributor Author

something is still off though


static int bn_compare(u8* a, u8* b, u32 n)
template <s32 n>
static inline int bn_compare(const u8* a, const u8* b)
Copy link
Contributor

@elad335 elad335 Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this just memcmp? you can clamp the result to +1 and -1 for completeness.

@Megamouse
Copy link
Contributor Author

Turns out the optimization is fruitless since it needs the point copies after all. -> same time as before.

@Megamouse Megamouse marked this pull request as draft July 9, 2023 12:18
@Megamouse Megamouse force-pushed the testas branch 4 times, most recently from 80f067a to 6ed97d0 Compare July 12, 2023 21:44
@Megamouse
Copy link
Contributor Author

I made it run async for each entry.
Now it only takes 20 seconds to install Demon's souls instead of 200.

@Megamouse
Copy link
Contributor Author

turns out I was basically sidestepping the verification due to thread locals.

@Megamouse Megamouse marked this pull request as ready for review July 16, 2023 07:32
@Megamouse Megamouse merged commit 43cfb3c into RPCS3:master Jul 16, 2023
5 checks passed
@Megamouse Megamouse deleted the testas branch July 16, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimization Optimizes existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants