On Intel CPU Skylake and newer __builtin_prefetch doesn't need to be protected with a null check
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 570
- Avg merge
- 23h 43m
- Merged PRs (30d)
- 172
Description
See: https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/linked_list.h#L48
From Intel Manual:
> The cache hierarchy of the Skylake microarchitecture has the following enhancements:
• Higher Cache bandwidth compared to previous generations.
• Simultaneous handling of more loads and stores enabled by enlarged buffers.
• Processor can do two page walks in parallel compared to one in Haswell microarchitecture and earlier
generations.
• Page split load penalty down from 100 cycles in previous generation to 5 cycles.
• L3 write bandwidth increased from 4 cycles per line in previous generation to 2 per line.
• Support for the CLFLUSHOPT instruction to flush cache lines and manage memory ordering of flushed
data using SFENCE.
• ***Reduced performance penalty for a software prefetch that specifies a NULL pointer.***
• L2 associativity changed from 8 ways to 4 ways.
Did a quick test on my machine not seeing any ```DTLB_LOAD_MISSES``` on prefetch ```NULL``` (or any address less than 4096 for that matter).
Contributor guide
Assessment
This issue has not been assessed yet.