We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9511e92 commit 1eb4d3fCopy full SHA for 1eb4d3f
mypyc/lib-rt/librt_base64.c
@@ -17,20 +17,21 @@ b64decode_handle_invalid_input(
17
18
static void
19
convert_encoded_to_urlsafe(char *buf, size_t actual_len) {
20
+ // The loop is written to enable SIMD optimizations
21
for (size_t i = 0; i < actual_len; i++) {
22
char ch = buf[i];
23
if (ch == '+') {
24
ch = '-';
25
} else if (ch == '/') {
26
ch = '_';
27
}
- // Always assign to buf[i] to avoid mispredicted branches within loop body
28
buf[i] = ch;
29
30
31
32
33
convert_urlsafe_to_encoded(const char *src, size_t actual_len, char *buf) {
34
35
36
char ch = src[i];
37
if (ch == '-') {
0 commit comments