Skip to content

Commit 1f8ff74

Browse files
gpsheadclaude
andcommitted
Simplify block comment for base64 helpers
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7458c99 commit 1f8ff74

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Modules/binascii.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,9 @@ static const unsigned char table_a2b_base64[] Py_ALIGNED(64) = {
103103
#define BASE64_MAXBIN ((PY_SSIZE_T_MAX - 3) / 2)
104104

105105
/*
106-
* Base64 encoding/decoding helpers optimized for throughput.
106+
* Fast base64 encoding/decoding helpers.
107107
*
108-
* Key optimization: Process complete groups (3 bytes -> 4 chars for encode,
109-
* 4 chars -> 3 bytes for decode) without loop-carried dependencies.
110-
* This allows the compiler to better optimize the hot loops.
108+
* Process complete groups without loop-carried dependencies.
111109
*/
112110

113111
/* Align to 64 bytes to ensure table fits in a single L1 cache line */
@@ -138,7 +136,6 @@ base64_encode_fast(const unsigned char *in, Py_ssize_t in_len,
138136
Py_ssize_t n_trios = in_len / 3;
139137
Py_ssize_t i;
140138

141-
/* Process complete 3-byte groups. Each iteration is independent. */
142139
for (i = 0; i < n_trios; i++) {
143140
base64_encode_trio(in + i * 3, out + i * 4, table);
144141
}
@@ -179,7 +176,6 @@ base64_decode_fast(const unsigned char *in, Py_ssize_t in_len,
179176
Py_ssize_t n_quads = in_len / 4;
180177
Py_ssize_t i;
181178

182-
/* Process complete 4-character groups. Each iteration is mostly independent. */
183179
for (i = 0; i < n_quads; i++) {
184180
const unsigned char *inp = in + i * 4;
185181

0 commit comments

Comments
 (0)