0

Are reordering and interleaving interchangeable terms when it comes to code compilation, optimization and execution?

2 Answers 2

2

I'd say they describe a similar technique but mean something else at the detail level.

Reordering means to take random instructions and move them around for some reason. It's pretty generic.

Interleaving means to have two long pieces of code which access different hardware resources and which can therefore run in parallel. Weaving the instructions in a clever pattern can result in better execution times.

Sign up to request clarification or add additional context in comments.

Comments

0

in case you are referring to out-of-order execution, this is something done at runtime by the processor depending on the availability of execution units and the instructions to be issued, while what Aaron described above would be at compile time (or even development time, if the code is complex (pointer aliasing comes to mind) or the compiler is not too good).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.