Tags: zhagnlu/folly
Tags
Use sse4.2 compile Signed-off-by: chasingegg <[email protected]>
Remove execption on Macos with shared mode Signed-off-by: Enwei Jiao <[email protected]>
Fix compile error with clang15 on MacOS Signed-off-by: Enwei Jiao <[email protected]>
set default not x86 arch Signed-off-by: Yusheng.Ma <[email protected]>
use fmt header only Signed-off-by: Yusheng.Ma <[email protected]>
use fmt header only Signed-off-by: Yusheng.Ma <[email protected]>
use fmt header only Signed-off-by: Yusheng.Ma <[email protected]>
Change use_sse4_2 default value to True Signed-off-by: Enwei Jiao <[email protected]>
Update the built_marker hashing logic only for current project (#3934) Summary: Pull Request resolved: facebookincubator/velox#3934 Reviewed By: shri-khare Differential Revision: D42996394 fbshipit-source-id: e4fe54ba6e7f51b4fc640bf80bbb18b257903b1c
Speed up jemalloc checks Summary: `usingJEMalloc()` and related functions are very hot (called on pretty much every allocation/deallocation path in folly) and the use of `static` to cache the result is suboptimal, as it has an effect on code size (slow path is large, reducing the chance of inlining) and it is more expensive than necessary, because both the guard variable and the value need to be loaded, and they may even be in different cache lines. We can use a tri-state atomic instead. See generated code with godbolt: https://godbolt.org/z/GsrKdzPeM The entirety of the function is now just ``` fast(): # fast() movzx eax, byte ptr [rip + _ZN14FastStaticBoolIZ4fastvE4InitE5flag_E.0] test al, al je .LBB0_2 setg al ret .LBB0_2: jmp FastStaticBool<fast()::Init>::getSlow() # TAILCALL ``` which is very inlineable, and feedback-driven compilation can even move the branch on the **returned value** before the unlikely branch that confirms initialization. Reviewed By: swolchok Differential Revision: D42806135 fbshipit-source-id: f190cd7a996301391b88db316c7f42dbeadbcba6
PreviousNext