pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/95d6e0b2830c8e6bfd861042f6df6343891d5843

GH-131033: Enable the optimizing macros UNLIKELY and LIKELY for Clang… · python/cpython@95d6e0b · GitHub
Skip to content

Commit 95d6e0b

Browse files
authored
GH-131033: Enable the optimizing macros UNLIKELY and LIKELY for Clang (GH-131019)
This includes clang-cl on Windows, which does not define the GCC version that was previously being checked.
1 parent 9ee0214 commit 95d6e0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/obmalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,9 +1523,9 @@ PyObject_Free(void *ptr)
15231523
}
15241524

15251525

1526-
/* If we're using GCC, use __builtin_expect() to reduce overhead of
1526+
/* Use __builtin_expect() where available to reduce overhead of
15271527
the valgrind checks */
1528-
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
1528+
#if (defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 2))) && defined(__OPTIMIZE__)
15291529
# define UNLIKELY(value) __builtin_expect((value), 0)
15301530
# define LIKELY(value) __builtin_expect((value), 1)
15311531
#else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

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