speeddifference command window/editor?

When timing my algorithm, I see a very big difference when using the editor and running the algorithm or by copy pasting the code into the command window. Does anyone knows where does that difference come from?

回答 (1 件)

Jan
Jan 2012 年 9 月 26 日

0 投票

Code stored in a function is accelerated by the JIT, the Just-In-Time compiler. Therefore speed measurements should be performed with functions.
But when you add a "clear all" or clear the function specifically, reloading the M-file needs a lot of time.
A more detailed explanation is possible, if you post the corresponding code and your timings.

この質問は閉じられています。

タグ

質問済み:

2012 年 9 月 26 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by