Skip to content

Commit 1eb4d3f

Browse files
committed
Update comments
1 parent 9511e92 commit 1eb4d3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/lib-rt/librt_base64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ b64decode_handle_invalid_input(
1717

1818
static void
1919
convert_encoded_to_urlsafe(char *buf, size_t actual_len) {
20+
// The loop is written to enable SIMD optimizations
2021
for (size_t i = 0; i < actual_len; i++) {
2122
char ch = buf[i];
2223
if (ch == '+') {
2324
ch = '-';
2425
} else if (ch == '/') {
2526
ch = '_';
2627
}
27-
// Always assign to buf[i] to avoid mispredicted branches within loop body
2828
buf[i] = ch;
2929
}
3030
}
3131

3232
static void
3333
convert_urlsafe_to_encoded(const char *src, size_t actual_len, char *buf) {
34+
// The loop is written to enable SIMD optimizations
3435
for (size_t i = 0; i < actual_len; i++) {
3536
char ch = src[i];
3637
if (ch == '-') {

0 commit comments

Comments
 (0)