Do you have a table comparing the execution speed between the four operations and the logical operations?

Asked 2 years ago, Updated 2 years ago, 40 views

I'm thinking about accelerating the algorithm now
I would like to know if it can be accelerated from the calculation procedure easily.
Therefore, we are looking for a universal and general comparison of effective speed between the four operations and the execution speed of logical operations.
For example, do you have data such as the size of the time it takes to get an answer from a state where there is already a value in the register, or the number of specific clocks?

algorithm

2022-09-30 16:53

1 Answers

An improvement in the algorithm is usually sufficient based on the total number of operations when dropped into the appropriate pseudo code.Reducing the nesting of loops or skipping the whole process with pruning is a common method of algorithmic improvement because the total number of processes is significantly reduced.Trying to reduce the amount of time each operation takes is like trying to reduce the number of lines of pseudo-code.

The CPU instruction clock count is listed in the datasheet as indicated in the comments, but it's no use worrying unless you're writing an assembler-level program with a simple CPU with no pipelines, out-of-order execution, or branch prediction.Using modern programming languages and compilers, a simple a+b process does not necessarily mean that it is an additional instruction.


2022-09-30 16:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.