Skip to content

Commit e2bba3c

Browse files
committed
py/misc: use __builtin_strcmp to enable compile-time optimization
1 parent 8b7237b commit e2bba3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/misc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ typedef struct {
299299
inline __attribute__((always_inline)) const char *MP_COMPRESSED_ROM_TEXT(const char *msg) {
300300
// "genhdr/compressed.data.h" contains an invocation of the MP_MATCH_COMPRESSED macro for each compressed string.
301301
// The giant if(strcmp) tree is optimized by the compiler, which turns this into a direct return of the compressed data.
302-
#define MP_MATCH_COMPRESSED(a, b) if (strcmp(msg, a) == 0) { return b; } else
302+
#define MP_MATCH_COMPRESSED(a, b) if (__builtin_strcmp(msg, a) == 0) { return b; } else
303303

304304
// It also contains a single invocation of the MP_COMPRESSED_DATA macro, we don't need that here.
305305
#define MP_COMPRESSED_DATA(x)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy