How to write a benchmark??

Miscellaneous Forums/General Discussion/How to write a benchmark??

Find out how to record the start time in millisecs, do the code, get the endtime in miisecs - starttime and display (or output to a file).

Now the code bit, don't just do each function once or it'll be too quick, you need to do it several times, e.g. 10 or 100 (depending on function speed).

Try writing a simple for loop of 100,000 or so and see how long that takes. Then try doing something in the for loop like maths. Try a copy of bytes or ints from one location to another (do each byte/int copy individually in a loop rather than using a bulk/batch command). Try copying lots of data to the video card for a benchmark. Also do from video to memory as a separate memory card. Then think up more ideas!