Speed of exception throwing and catching
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I'm trying to analyse the exact time involved in throwing and catching an exception (I've used the profiler practically to get time in ms, but am interested in how and why this corresponds to clock cyles, I'm just trying to get a more theoretical understanding). I'm looking for an exact number of clock cycles.
How many clock cycles are used to throw an exception and how many clock cycles are used to catch that exception and what does on during the throwing/catching process to cause those clock cycles to be used?
With many thanks,
Froskoy.
0 件のコメント
回答 (1 件)
Jan
2012 年 7 月 12 日
I'm convinced, that PROFILE does not allow to measure processor cycles for specific commands. On one hand PROFILE disables the JIT acceleration, on the other hand the clock used by PROFILE has a course precision only (0.01 or 0.001 sec, as far as I remember).
The FEX: High-Accuracy-Timer offers a higher precision under Windows. But this program has a distinct overhead itself, such that you have to be very careful.
I'm using TRY/CATCH to save hours (days!) of debugging, therefore I do not care much about processor cycles as long as my 200'000 lines of code program runs in less than 5 seconds.
2 件のコメント
Jan
2012 年 7 月 12 日
I assume that all tools I know violate the license conditions, which forbid a reverse engineering.
On the other hand (at least) in earlier Matlab versions (2009a as far as I remember) you can enable different memory managers at startup. But adjusting a Matlab program to a specific memory manager is not a good idea, because the next Matlab release could use a different approach already.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!