27 Oct 2002 22:08
RE: [U2] [UD] Speedtesting REMOVE was(Exit BASIC program with SELECT list?)
Allen E. Elwood <aelwood <at> socal.rr.com>
2002-10-27 21:08:49 GMT
2002-10-27 21:08:49 GMT
The results of the speedtesting on REMOVE vs. scooping off the top attr are in. The winner is... REMOVE! SPEEDTEST.REMOVE How long in seconds? ?10 82202 total loops 8220.2 per second :SPEEDTEST.SCOOPOFF How long in seconds? ?10 24338 total loops 2433.8 per second Using the remove method, the program was able to read a record and process the attributes 8,220 times per second, while the scoopoff came in a miserable 2,434 per second, making REMOVE close to FOUR times faster than scooping off. Thanks go to Allen Egerton, who obviously shares the same first name as me, as well as the last initial. Here's the code from the two speed test programs, in case anyone would care to test their speed on this construct, or any for that matter. I picked this up from a BASIC games book about 20 years ago. The most simplest form of the speedtest program is at the end. When I execute that, I get 1,475,104 loops per second out of my 2.6 GHz P4. Woof! My first machine, a Data General Nova 3 barely got 200 loops per second.(Continue reading)
* Release
* CUSTOM
* SPEEDTEST - does what it sounds like
Version="~Ver=~7.0.3~7775383~"
OPEN '', 'CM' TO CM ELSE OPEN.ERROR<-1> = 'CM'
PRINT 'How long in seconds? ':;INPUT HL
START = TIME()
ENDING = START + HL
COUNTER = 0
RSS Feed