Is there a hint I can put in my code indicating that a line should be removed from cache? As opposed to a prefetch hint, which would indicate I will soon need a line. In my case, I know when I won't need a line for a while, so I want to be able to get rid of it to free up space for lines I do need.
相关问题
- Faster loop: foreach vs some (performance of jsper
- Why wrapping a function into a lambda potentially
- Ado.net performance:What does SNIReadSync do?
- Device support warning : Google play 2019
- Null-terminated string, opening file for reading
相关文章
- Is there a google API to read cached content? [clo
- DOM penalty of using html attributes
- Which is faster, pointer access or reference acces
- Django is sooo slow? errno 32 broken pipe? dcramer
- Understanding the difference between Collection.is
- Is it possible to run 16 bit code in an operating
- parallelizing matrix multiplication through thread
- How to determine JS bottlenecks in React Native co
clflush
,clflushopt
They are not available on every CPU (in particular,
clflushopt
is only available on the 6th generation and later). To be certain, you should useCPUID
to verify their availability:If available, you should use
clflushopt
. It outperformsclflush
when flushing buffers larger than 4KiB (64 lines).This is the benchmark from Intel's Optimization Manual:
For informational purpose (assuming you are running in a privileged context), you can also use
invd
(as a nuke-from-orbit option). This:or
wbinvd
, which:A future instruction that could make it into the ISA is
club
. Although this won't fit your need (because it doesn't necessarily invalidate the line), it's worth mentioning for completeness. This would: