Skip to content

Optimize OCBBlockCipher_v149 by replacing Vector with List#1057

Merged
ArneBab merged 1 commit into
hyphanet:nextfrom
bertm:optimize-ocbblockcipher-v149
Jun 22, 2025
Merged

Optimize OCBBlockCipher_v149 by replacing Vector with List#1057
ArneBab merged 1 commit into
hyphanet:nextfrom
bertm:optimize-ocbblockcipher-v149

Conversation

@bertm

@bertm bertm commented May 11, 2025

Copy link
Copy Markdown
Contributor

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.
*/
// NOTE: elements are lazily calculated
private Vector<byte[]> L;
private List<byte[]> L;

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As code using a byte[][] would be quite a bit harder to read, I would also suggest leaving this until we notice actual performance problems due to List usage. 🙂

@ArneBab ArneBab merged commit 0ad7edd into hyphanet:next Jun 22, 2025
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.

3 participants