Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - [Matrix1] Low Level Performance Test

Chris Tate
DBPro Master
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Jul 2015 21:30 Edited at: 19th Jul 2015 21:31
This performance test is a concise program which measures the time it takes to perform arbitrary operations. The operations can any command or function that you need to time the execution of. The code being timed is executed no more than once per second.

The snippet is used by copying and pasting code or a function reference into one of the test functions. For example, two methods could be compared by calling method 1 in the supplied function called Test1(), and the second in Test2(). The time taken to execute is displayed output to screen.

If you use any 3D commands, the CLS call in the program loop will need to be omitted so that the screen does not flicker. Each test loop should be changed to the amount of iterations you need to time; for instance, use FOR i = 1 to 10, for ten iterations; all test should compare the same amount of iterations.

The Matrix1 utilities library supplies a special timer used in this snippet.

Login to post a reply

Server time is: 2024-02-21 06:11:11
Your offset time is: 2024-02-21 06:11:11