What non-local effects can change the performance of the base unit?

A The main block is a fragment of an assembly with only one entry point and one exit point (the link on Wikipedia also has a more strict definition). Many attempts to optimize the compiler rely on the compiler to break the user code into basic blocks before giving them the optimizer.

I am curious to know what non-local effects can affect the performance of the base unit itself. By non-local effects, I mean how code outside the base unit is run before it can affect its operating time, or how code placed in memory can affect it. This is a bit more restrictive than worrying about the performance of arbitrary programs with loops, branches, etc.

At the top of the cache of my chapter, other parts of the program are used, both the memory cache and the command, seem to be the biggest possible non-local effect. Also, the status of the pipeline settings according to previously executed instructions or earlier instructions that are in flight. I'm only interested in x86 / x86-64, but the impact on other architectures seems to be worth knowing too. Are there other nonlocal effects?

+4
source share
2 answers

Here is a short list:

  • Location of code and data in a memory hierarchy
  • Cache Line Effects
  • Other threads running in parallel
  • Locks and other synchronization
  • Interrupts (from I / O devices or OS trap calls)
  • Page Errors Due to Access Templates
  • Data access dependencies (same or different memory addresses)
  • Serialization / coherence recording

Good luck with them.

+5
source

If the base unit contains a function call, this is a big unknown.

0
source

All Articles