开发者

Running time vary on Microblaze after code modification

开发者 https://www.devze.com 2023-03-22 03:37 出处:网络
When I do开发者_JAVA百科 some modifications in my code that runs on Microblaze, I sometimes see a large discrepancy in runtime for the execution of code that follows the same path. To illustrate, what

When I do开发者_JAVA百科 some modifications in my code that runs on Microblaze, I sometimes see a large discrepancy in runtime for the execution of code that follows the same path. To illustrate, what I really mean by same path, take this example,

if ( condition )
 execute_this();
else
 execute_that(); // Modified this function

So say if I modified the code for function execute_that, I would see change in runtime even when condition was set and function execute_this has not been modified. What can cause this? Memory Alignment of Functions? Cache? Any clue?


Does the timing only change when you change the other function, or is it variable anyway?

Are you running an OS? Could other tasks pre-empt yours?

Are interrupts running? An interrupt during your function will change the runtime.

And, yes, cache effects could cause this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号