Skip to content

Tags: zhagnlu/folly

Tags

v2023.10.30.04

Toggle v2023.10.30.04's commit message
Use sse4.2 compile

Signed-off-by: chasingegg <[email protected]>

v2023.10.30.02

Toggle v2023.10.30.02's commit message
Remove execption on Macos with shared mode

Signed-off-by: Enwei Jiao <[email protected]>

v2023.10.30.01

Toggle v2023.10.30.01's commit message
Fix compile error with clang15 on MacOS

Signed-off-by: Enwei Jiao <[email protected]>

v2023.07.12

Toggle v2023.07.12's commit message
set default not x86 arch

Signed-off-by: Yusheng.Ma <[email protected]>

v2023.05.22.02

Toggle v2023.05.22.02's commit message
use fmt header only

Signed-off-by: Yusheng.Ma <[email protected]>

v2023.05.22.01

Toggle v2023.05.22.01's commit message
use fmt header only

Signed-off-by: Yusheng.Ma <[email protected]>

v2023.05.22

Toggle v2023.05.22's commit message
use fmt header only

Signed-off-by: Yusheng.Ma <[email protected]>

v2023.02.24

Toggle v2023.02.24's commit message
Change use_sse4_2 default value to True

Signed-off-by: Enwei Jiao <[email protected]>

v2023.02.06.00

Toggle v2023.02.06.00's commit message
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

v2023.01.30.00

Toggle v2023.01.30.00's commit message
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