Crypto: add sync.Pool for AES cipher blocks #202

Closed
opened 2026-03-10 00:09:07 +00:00 by ash · 0 comments
Owner

Problem

Doc claims sync.Pool but none exists. Each call creates new aes.NewCipher + cipher.NewGCM.

Measured

Approach ns/op B/op allocs
Current 754 1568 3
sync.Pool 234 288 1

3.2x faster, 5.4x less memory.

Severity

🟡 Fix soon.

## Problem Doc claims sync.Pool but none exists. Each call creates new aes.NewCipher + cipher.NewGCM. ## Measured | Approach | ns/op | B/op | allocs | |---|---|---|---| | Current | 754 | 1568 | 3 | | sync.Pool | 234 | 288 | 1 | 3.2x faster, 5.4x less memory. ## Severity 🟡 Fix soon.
ash closed this issue 2026-03-10 07:14:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#202
No description provided.