Implement assume()
Summary: In some cases hinting the compiler about conditions that are guaranteed to be true can help it generate better code. For instance, remove unnecessary bound checks. Clang has `__builtin_assume` and on GCC we can simulate it with `__builtin_unreachable`, so better just abstract both into a function. Reviewed By: @philippv Differential Revision: D2419937
Showing
folly/Assume.h
0 → 100644
Please register or sign in to comment