Skip to content

Optimize OCBBlockCipher_v149 by replacing Vector with List #1057

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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

bertm
Copy link
Contributor

@bertm bertm commented May 11, 2025

This saves about 10% time on AES block processing for AEAD buckets.
When combined with #1056 the improvement is even more substantial.

This saves about 10% time on AES block processing for AEAD buckets.
@@ -49,7 +50,7 @@ public class OCBBlockCipher_v149
* KEY-DEPENDENT
*/
// NOTE: elements are lazily calculated
private Vector<byte[]> L;
private List<byte[]> L;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could still be optimized slightly further by using byte[][], but the changes are a bit more complex and not worth the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant