2 performance questions

1) Is there any way of determining/measuring the the extent of the floating point part of my computation (as a % of runtime)?

2) Also, is there any way what to determine what currently dominates in my application - (I/O) or compute?

I guess what I need are some sort of monitoring functions available?
[321 byte] By [jdm2104] at [2007-11-20 11:20:47]
# 1 Re: 2 performance questions
I'm not sure what you mean by point 1), but if you mean you want to compare the difference between using floating points and integers for some kind of calculation, you could do two loops, one with integers and one with floats, that perform the calculation 10 000 times or so each and compare the time they took to complete.

Here's an article on measuring time taken for an operation at a very high level of precision:
http://www.codeproject.com/csharp/highperformancetimercshar.asp

Regarding point 2), I haven't used any libraries to measure I/O and CPU usage of my applications, but Windows' own task manager can help you get a general idea.

If you go to the "Processes" tab and choose View -> Select Columns..., you'll be able to check I/O Writes and Reads etc.
andreasblixt at 2007-11-9 11:36:35 >
# 2 Re: 2 performance questions
Thanks for the reply, sorry I should have been clearer.

For question one I want to find out how long all the floating point calculations in a function take as a percentage of the total function runtime?

Thanks
jdm2104 at 2007-11-9 11:37:36 >
# 3 Re: 2 performance questions
Sounds for me like a task for a profiler. Google for it. You will find several profiler for .NET applications.
torrud at 2007-11-9 11:38:35 >
# 4 Re: 2 performance questions
Thanks
jdm2104 at 2007-11-9 11:39:40 >