Author: Jürgen Hartmann
Date: 11:31:37 06/10/00
Go up one level in this thread
On June 10, 2000 at 00:57:34, James Robertson wrote: >I just ran a test on my computer (P233) to test speed, and the lines: > >char *c = new int[264]; >delete [] c; > >were executed about 480,000 times per second. I suppose this is very fast for >what most people are doing. If I change the number 264 to 64000, this drops to >about 19,000 times per second. > >James This test is not realistic. Memory management will always give you back the same 264 byte chunk. Tougher is: #define NMAX_TESTS 1000 char *pCharArr[ NMAX_TESTS ]; for ( int j = 0; j < NMAX_TESTS; j++ ) pCharArr[j] = new char [ Random( NMAX_TESTS ) + 1 ]; for ( j = 0; j < NMAX_TESTS; j++ ) delete[] pCharArr[j];
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.