JamesD Posted July 26, 2019 Share Posted July 26, 2019 (edited) 1 hour ago, drpeter said: Although interestingly, benchmarking extracting 2 strings into e.g. B$ & C$ for comparison and comparing them in situ makes no significant difference, i.e. IF A$(1,10) = A$(11,20) THEN... performs the same as B$=A$(1,10):C$=A$(11,20):IF B$=C$ THEN.... perhaps ATARI BASIC makes temporary copies of substrings before performing a comparison... That might simplify the string compare code in the interpreter. At least it makes the sort code smaller. Given the CPU speed, I can't see it being slower than MS BASIC on a 1MHz or less machine. Here is the updated code. The MS BASIC code wouldn't require a huge number of changes to get the program working on the Atari. Spoiler 'I opted for saving the end of the string instead of string length, shortened some variable names, and added spaces so it's easier to read. 'NX = Name string indeX, replaces INDEX from previous version, 'NA = Name Array$, replaces ARRAY$. Is this even needed? 'P1 = pointer array to start of strings, replaces PNTR 'P2 = pointer array to end of strings, replaces length and calculations of the end of strings 'S1 = String 1 index 'S2 = String 2 index 'B = the index array from previous version, no idea why I chose B when I wrote the original code 'T = temp for the swap 'R=0 seemed to be a leftover from earlier code, so it was removed 'NW has to do with the size of the name array but I'm not sure why I chose it. 'Switching variable names in this sort to a single byte name should speed it up slightly. 19 FOR I=1 TO NW : S1=NX(B(I)) : S2=(NX(B(I+G)) : IF NA$(P1(S1), P2(S1)) > NA$(P1(S2), PR2(S2)) THEN T=B(I) : B(I)=B(I+G) : B(I+G)=T 1 hour ago, drpeter said: PS Infocom's Z-machine specification not only packed string constants end-to-end, it also applied a compression algorithm to the text, reducing memory requirements by a further ~33% but naturally at the expense of speed due to the need to decompress the text when referenced. In fact it did the same for all string literals in the source, e.g. the text in PRINT "INFOCOM Z-MACHINE" Yeah, I figured they did. Can't use it here due to the sort, but for printed strings it would be nice. I've toyed with the idea of adding some sort of data decompression to BASIC, LZ4 maybe, but I decided that was best left to the realm of compilers. Edited July 26, 2019 by JamesD Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 26, 2019 Share Posted July 26, 2019 (edited) I think this is the correct code, I left the previous code intact in case I forgot something. 19 FOR I=1 TO NW : S1=B(I) : S2=B(I+G) : IF NA$(P1(S1), P2(S1)) > NA$(P1(S2), P2(S2)) THEN B(I)=S2 : B(I+G)=S1 VS MS BASIC 19 FOR I=1 TO NW : IF A$(B(I)) > A$(B(I+G)) THEN T=B(I) : B(I)=B(I+G) : B(I+G)=T Edited July 26, 2019 by JamesD Optimized Atari code Quote Link to comment Share on other sites More sharing options...
drpeter Posted July 26, 2019 Share Posted July 26, 2019 Yes, that looks correct :-) Quote 'Switching variable names in this sort to a single byte name should speed it up slightly. I don't think this makes any difference in ATARI BASIC as each line of code is fully tokenised on entry, so variables are already represented by a 1 byte token at runtime. 1 Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 26, 2019 Share Posted July 26, 2019 Other Atari BASIC changes for the MS BASIC program I posted. Not sure if they are correct, but I think it's how it should work. Spoiler 0 I=0:N=1000:C=0:D=0:E=0:NW=0:LENGTH=0:S1=0:S2=0 4 READ K$,C,D,E : IF K$ <> "" THEN N=N+1 : LENGTH=LENGTH+LEN(K$) : GOTO 4 7 DIM A$(LENGTH),B(N),P1(N),P2(N) 8 P1(1)=1 : FOR I=1 TO N : READ K$,C,D,E : B(I)=I : LENGTH=LEN(K$) : P2(I)=P1(I)+LENGTH : A$(P1(I),P2(I))=K$ : P1(I+1)=P2(I)+1 : NEXT I haven't looked at changing line 21 and 23 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 26, 2019 Share Posted July 26, 2019 there were several write ups over the years on how to get the best performance out of Atari Basic for different sorts, arrays, and string manipulations. Dr. Peter is also correct in that there were routines and calls developed over the year for this sort of thing as well. Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 27, 2019 Share Posted July 27, 2019 Hi! On 7/24/2019 at 1:02 PM, JamesD said: As for how MS BASIC stores strings vs Fast BASIC... it may not be the fastest approach, but MS BASIC was designed to run with as little as 4K of RAM. When you start allocating 256 bytes for every string, you are going to run out of RAM in a hurry in certain cases. My test program to compare string, and memory move changes, reads 891 of the most popular sir names, and related info from DATA statements, then arranges them in alphabetical order. Unless I misunderstood what Fast BASIC does, that would require 228,096 bytes, or almost 223K of RAM just for the string variable portion of the data. As long as you aren't dealing with a lot of strings, the Fast BASIC approach may be superior, but it sounds like it's a memory hog. For strings that will ALWAYS be a shorter length, and are rarely if ever manipulated, some form of packed or compact string might be in order. Or did I miss something? Yes, this is how it currently works. I started to implement the idea of "small string arrays", my idea was having support for this: DIM NAMES$(891,30) ' Array of 892 strings of max 30 characters, uses 892 * 31 = 27652 bytes OPEN #1, 4, 0, "D:NAMES.TXT" FOR I=1 TO 800 INPUT #1, NAMES$(I) NEXT I Tee idea is that internally the data is stored as a contiguous array of bytes. To make this work, I would need to add three new tokens, "COPY_SHORT_STR", "CAT_SHORT_STR" and "INDEX_SHORT_STR", perhaps the current ones could be modified to reuse the code. But the main problem is that the interpreter would need some place to store the array stride (31 in the example), currently arrays are simply pointers to the first element, and the parser knows from the variable type the size of each element. As with this syntax the size would be variable, it would need to be kept at runtime. Another possibility is only allowing the string size to be a constant, and making the parser keep the value in the parsing tables. This would make the parser more complicated (the variable table would need space for the size) but the runtime faster and simpler. At the end, I did not implement the above as nobody has requested this feature, I think that for the main use cases of FastBasic (writing games or simple apps) this is not really that useful. If somebody came with a good use-case for short-strings (or two dimensional arrays, they present the same kind of problems), I don't think I would implement it. Remember that another feature of FastBasic is that the full IDE uses less than 8KB! Have Fun! Quote Link to comment Share on other sites More sharing options...
drpeter Posted July 27, 2019 Share Posted July 27, 2019 (edited) For anyone interested, this is a fully working but non-optimised version of the comb sort routine for ATARI BASIC. It includes only 300 names due to memory constraints imposed by the memory-inefficient substring pointer system, which 'wastes' two full precision floating point variables for each substring due to the absence of integer variables in ATARI BASIC. At the cost of increasing code complexity and reduced speed, the pointers could instead be stored in and retrieved from strings implemented as word/byte arrays.... It also unnecessarily duplicates pointer information, as the end of one substring is necessarily one less than the start of the next substring, so the end of a substring could instead be retrieved as S(X+1)-1... Spoiler 0 DIM K$(50),N$(1817):DIM S(299),F(299),B(299):POKE 752,1:DIM A$(4),B$(1),CLS$(1):GOTO 45 51 REM K$=TEMP,N$=NAME ARRAY,S()=SUBSTRING START PTRS,F()=SUBSTRING END PTRS 52 REM A$=CHARACTERS FOR BUSY CURSOR 53 REM B$=BACKSPACE, CLS$=CLEAR SCREEN, POKE 752,1 =SYSTEM CURSOR OFF 5 X=X+1:? B$;A$(X,X);:IF X=4 THEN X=0:REM BUSY CURSOR 6 RETURN 10 P=1:F=1.3:G=1:L=0:REM SORT SUBROUTINE 13 L=L+1:P=P*F:G=INT(N/P):IF G<1 THEN G=1 14 NW=N-G:? "PASS ";L;" GAP ";G;" ";:IF G=1 THEN S=1 15 FOR I=0 TO NW-1:IF N$(S(B(I)),F(B(I)))<=N$(S(B(I+G)),F(B(I+G))) THEN GOTO 20 17 T=B(I):B(I)=B(I+G):B(I+G)=T:S=0 20 GOSUB 5 21 NEXT I:IF S=1 THEN RETURN 22 ? B$:GOTO 13 25 ? :? "CHECKING SORT... ";:R=0:FOR I=0 TO N-2:REM CHECK SORT ORDER ROUTINE 27 IF N$(S(B(I)),F(B(I)))>N$(S(B(I+1)),F(B(I+1))) THEN ? "OUT OF ORDER ";N$(S(B(I)),F(B(I))):R=1 30 GOSUB 5:NEXT I:? B$:? :RETURN 40 FOR I=0 TO N-1:? N$(S(B(I)),F(B(I)));" ";:NEXT I:RETURN 44 REM MAIN 45 N=0:A$(1)=CHR$(22):A$(2)=CHR$(13):A$(3)=CHR$(2):A$(4)=CHR$(14):B$=CHR$(126):CLS$=CHR$(125) 55 ? CLS$:? "COMB SORT MOST POPULAR SURNAMES":? :? "LOADING DATA... "; 60 READ K$,C,D,E:IF K$="$$$$" THEN GOTO 70 61 GOSUB 5:REM BUSY CURSOR 62 S(N)=LEN(N$)+1:N$(LEN(N$)+1)=K$:F(N)=LEN(N$):L=L+LEN(K$):B(N)=N:N=N+1:GOTO 60 70 ? B$:? N;" NAMES LOADED":? "TOTAL LENGTH ";L;" BYTES":? 88 GOSUB 10:? B$:REM SORT ROUTINE 90 GOSUB 25:REM CHECK SORT ORDER 92 GOSUB 40:REM PRINT SORTED LIST 95 ? :? :? "DONE":POKE 752,0:END 100 DATA SMITH,2501922,1.006,1,JOHNSON,2014470,.81,2,WILLIAMS,1738413,.699,3 101 DATA JONES,1544427,.621,4,BROWN,1544427,.621,5,DAVIS,1193760,.48,6 102 DATA MILLER,1054488,.424,7,WILSON,843093,.339,8,MOORE,775944,.312,9 103 DATA TAYLOR,773457,.311,10,ANDERSON,773457,.311,11,THOMAS,773457,.311,12 104 DATA JACKSON,770970,.31,13,WHITE,693873,.279,14,HARRIS,683925,.275,15 105 DATA MARTIN,678951,.273,16,THOMPSON,669003,.269,17,GARCIA,631698,.254,18 106 DATA MARTINEZ,581958,.234,19,ROBINSON,579471,.233,20,CLARK,574497,.231,21 107 DATA RODRIGUEZ,569523,.229,22,LEWIS,562062,.226,23,LEE,547140,.22,24 108 DATA WALKER,544653,.219,25,HALL,497400,.2,26,ALLEN,494913,.199,27 109 DATA YOUNG,479991,.193,28,HERNANDEZ,477504,.192,29,KING,472530,.19,30 110 DATA WRIGHT,470043,.189,31,LOPEZ,465069,.187,32,HILL,465069,.187,33 111 DATA SCOTT,460095,.185,34,GREEN,455121,.183,35,ADAMS,432738,.174,36 112 DATA BAKER,425277,.171,37,GONZALEZ,412842,.166,38,NELSON,402894,.162,39 113 DATA CARTER,402894,.162,40,MITCHELL,397920,.16,41,PEREZ,385485,.155,42 114 DATA ROBERTS,380511,.153,43,TURNER,378024,.152,44,PHILLIPS,370563,.149,45 115 DATA CAMPBELL,370563,.149,46,PARKER,363102,.146,47,EVANS,350667,.141,48 116 DATA EDWARDS,340719,.137,49,COLLINS,333258,.134,50,STEWART,330771,.133,51 117 DATA SANCHEZ,323310,.13,52,MORRIS,310875,.125,53,ROGERS,305901,.123,54 118 DATA REED,303414,.122,55,COOK,298440,.12,56,MORGAN,293466,.118,57 119 DATA BELL,290979,.117,58,MURPHY,290979,.117,59,BAILEY,286005,.115,60 120 DATA RIVERA,281031,.113,61,COOPER,281031,.113,62,RICHARDSON,278544,.112,63 121 DATA COX,273570,.11,64,HOWARD,273570,.11,65,WARD,268596,.108,66 122 DATA TORRES,268596,.108,67,PETERSON,266109,.107,68,GRAY,263622,.106,69 123 DATA RAMIREZ,261135,.105,70,JAMES,261135,.105,71,WATSON,256161,.103,72 124 DATA BROOKS,256161,.103,73,KELLY,253674,.102,74,SANDERS,248700,.1,75 125 DATA PRICE,246213,.099,76,BENNETT,246213,.099,77,WOOD,243726,.098,78 126 DATA BARNES,241239,.097,79,ROSS,238752,.096,80,HENDERSON,236265,.095,81 127 DATA COLEMAN,236265,.095,82,JENKINS,236265,.095,83,PERRY,233778,.094,84 128 DATA POWELL,231291,.093,85,LONG,228804,.092,86,PATTERSON,228804,.092,87 129 DATA HUGHES,228804,.092,88,FLORES,228804,.092,89,WASHINGTON,228804,.092,90 130 DATA BUTLER,226317,.091,91,SIMMONS,226317,.091,92,FOSTER,226317,.091,93 131 DATA GONZALES,216369,.087,94,BRYANT,216369,.087,95,ALEXANDER,211395,.085,96 132 DATA RUSSELL,211395,.085,97,GRIFFIN,208908,.084,98,DIAZ,208908,.084,99 133 DATA HAYES,206421,.083,100,MYERS,206421,.083,101,FORD,203934,.082,102 134 DATA HAMILTON,203934,.082,103,GRAHAM,203934,.082,104,SULLIVAN,201447,.081,105 135 DATA WALLACE,201447,.081,106,WOODS,198960,.08,107,COLE,198960,.08,108 136 DATA WEST,198960,.08,109,JORDAN,193986,.078,110,OWENS,193986,.078,111 137 DATA REYNOLDS,193986,.078,112,FISHER,191499,.077,113,ELLIS,191499,.077,114 138 DATA HARRISON,189012,.076,115,GIBSON,186525,.075,116,MCDONALD,186525,.075,117 139 DATA CRUZ,186525,.075,118,MARSHALL,186525,.075,119,ORTIZ,186525,.075,120 140 DATA GOMEZ,186525,.075,121,MURRAY,184038,.074,122,FREEMAN,184038,.074,123 141 DATA WELLS,181551,.073,124,WEBB,179064,.072,125,SIMPSON,174090,.07,126 142 DATA STEVENS,174090,.07,127,TUCKER,174090,.07,128,PORTER,171603,.069,129 143 DATA HUNTER,171603,.069,130,HICKS,171603,.069,131,CRAWFORD,169116,.068,132 144 DATA HENRY,169116,.068,133,BOYD,169116,.068,134,MASON,169116,.068,135 145 DATA MORALES,166629,.067,136,KENNEDY,166629,.067,137,WARREN,166629,.067,138 146 DATA DIXON,164142,.066,139,RAMOS,164142,.066,140,REYES,164142,.066,141 147 DATA BURNS,161655,.065,142,GORDON,161655,.065,143,SHAW,161655,.065,144 148 DATA HOLMES,161655,.065,145,RICE,159168,.064,146,ROBERTSON,159168,.064,147 149 DATA HUNT,156681,.063,148,BLACK,156681,.063,149,DANIELS,154194,.062,150 150 DATA PALMER,154194,.062,151,MILLS,151707,.061,152,NICHOLS,149220,.06,153 151 DATA GRANT,149220,.06,154,KNIGHT,149220,.06,155,FERGUSON,146733,.059,156 152 DATA ROSE,146733,.059,157,STONE,146733,.059,158,HAWKINS,146733,.059,159 153 DATA DUNN,144246,.058,160,PERKINS,144246,.058,161,HUDSON,144246,.058,162 154 DATA SPENCER,141759,.057,163,GARDNER,141759,.057,164,STEPHENS,141759,.057,165 155 DATA PAYNE,141759,.057,166,PIERCE,139272,.056,167,BERRY,139272,.056,168 156 DATA MATTHEWS,139272,.056,169,ARNOLD,139272,.056,170,WAGNER,136785,.055,171 157 DATA WILLIS,136785,.055,172,RAY,136785,.055,173,WATKINS,136785,.055,174 158 DATA OLSON,136785,.055,175,CARROLL,136785,.055,176,DUNCAN,136785,.055,177 159 DATA SNYDER,136785,.055,178,HART,134298,.054,179,CUNNINGHAM,134298,.054,180 160 DATA BRADLEY,134298,.054,181,LANE,134298,.054,182,ANDREWS,134298,.054,183 161 DATA RUIZ,134298,.054,184,HARPER,134298,.054,185,FOX,131811,.053,186 162 DATA RILEY,131811,.053,187,ARMSTRONG,131811,.053,188,CARPENTER,131811,.053,189 163 DATA WEAVER,131811,.053,190,GREENE,131811,.053,191,LAWRENCE,129324,.052,192 164 DATA ELLIOTT,129324,.052,193,CHAVEZ,129324,.052,194,SIMS,129324,.052,195 165 DATA AUSTIN,129324,.052,196,PETERS,129324,.052,197,KELLEY,129324,.052,198 166 DATA FRANKLIN,126837,.051,199,LAWSON,126837,.051,200,FIELDS,126837,.051,201 167 DATA GUTIERREZ,126837,.051,202,RYAN,126837,.051,203,SCHMIDT,126837,.051,204 168 DATA CARR,126837,.051,205,VASQUEZ,126837,.051,206,CASTILLO,126837,.051,207 169 DATA WHEELER,126837,.051,208,CHAPMAN,124350,.05,209,OLIVER,124350,.05,210 170 DATA MONTGOMERY,121863,.049,211,RICHARDS,121863,.049,212,WILLIAMSON,121863,.049,213 171 DATA JOHNSTON,121863,.049,214,BANKS,119376,.048,215,MEYER,119376,.048,216 172 DATA BISHOP,119376,.048,217,MCCOY,119376,.048,218,HOWELL,119376,.048,219 173 DATA ALVAREZ,119376,.048,220,MORRISON,119376,.048,221,HANSEN,116889,.047,222 174 DATA FERNANDEZ,116889,.047,223,GARZA,116889,.047,224,HARVEY,116889,.047,225 175 DATA LITTLE,114402,.046,226,BURTON,114402,.046,227,STANLEY,114402,.046,228 176 DATA NGUYEN,114402,.046,229,GEORGE,114402,.046,230,JACOBS,114402,.046,231 177 DATA REID,114402,.046,232,KIM,111915,.045,233,FULLER,111915,.045,234 178 DATA LYNCH,111915,.045,235,DEAN,111915,.045,236,GILBERT,111915,.045,237 179 DATA GARRETT,111915,.045,238,ROMERO,111915,.045,239,WELCH,109428,.044,240 180 DATA LARSON,109428,.044,241,FRAZIER,109428,.044,242,BURKE,109428,.044,243 181 DATA HANSON,106941,.043,244,DAY,106941,.043,245,MENDOZA,106941,.043,246 182 DATA MORENO,106941,.043,247,BOWMAN,106941,.043,248,MEDINA,104454,.042,249 183 DATA FOWLER,104454,.042,250,BREWER,104454,.042,251,HOFFMAN,104454,.042,252 184 DATA CARLSON,104454,.042,253,SILVA,104454,.042,254,PEARSON,104454,.042,255 185 DATA HOLLAND,104454,.042,256,DOUGLAS,101967,.041,257,FLEMING,101967,.041,258 186 DATA JENSEN,101967,.041,259,VARGAS,101967,.041,260,BYRD,101967,.041,261 187 DATA DAVIDSON,101967,.041,262,HOPKINS,101967,.041,263,MAY,99480,.04,264 188 DATA TERRY,99480,.04,265,HERRERA,99480,.04,266,WADE,99480,.04,267 189 DATA SOTO,99480,.04,268,WALTERS,99480,.04,269,CURTIS,99480,.04,270 190 DATA NEAL,96993,.039,271,CALDWELL,96993,.039,272,LOWE,96993,.039,273 191 DATA JENNINGS,96993,.039,274,BARNETT,96993,.039,275,GRAVES,96993,.039,276 192 DATA JIMENEZ,96993,.039,277,HORTON,96993,.039,278,SHELTON,96993,.039,279 193 DATA BARRETT,96993,.039,280,OBRIEN,96993,.039,281,CASTRO,96993,.039,282 194 DATA SUTTON,94506,.038,283,GREGORY,94506,.038,284,MCKINNEY,94506,.038,285 195 DATA LUCAS,94506,.038,286,MILES,94506,.038,287,CRAIG,94506,.038,288 196 DATA RODRIQUEZ,92019,.037,289,CHAMBERS,92019,.037,290,HOLT,92019,.037,291 197 DATA LAMBERT,92019,.037,292,FLETCHER,92019,.037,293,WATTS,92019,.037,294 198 DATA BATES,92019,.037,295,HALE,92019,.037,296,RHODES,92019,.037,297 199 DATA PENA,92019,.037,298,BECK,92019,.037,299,NEWMAN,89532,.036,300 1000 DATA $$$$,0,0,0 1001 REM END OF DATA Edited July 27, 2019 by drpeter 1 Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 27, 2019 Share Posted July 27, 2019 (edited) 6 hours ago, drpeter said: For anyone interested, this is a fully working but non-optimised version of the comb sort routine for ATARI BASIC. It includes only 300 names due to memory constraints imposed by the memory-inefficient substring pointer system, which 'wastes' two full precision floating point variables for each substring due to the absence of integer variables in ATARI BASIC. At the cost of increasing code complexity and reduced speed, the pointers could instead be stored in and retrieved from strings implemented as word/byte arrays.... It also unnecessarily duplicates pointer information, as the end of one substring is necessarily one less than the start of the next substring, so the end of a substring could instead be retrieved as S(X+1)-1... Reveal hidden contents 0 DIM K$(50),N$(1817):DIM S(299),F(299),B(299):POKE 752,1:DIM A$(4),B$(1),CLS$(1):GOTO 45 51 REM K$=TEMP,N$=NAME ARRAY,S()=SUBSTRING START PTRS,F()=SUBSTRING END PTRS 52 REM A$=CHARACTERS FOR BUSY CURSOR 53 REM B$=BACKSPACE, CLS$=CLEAR SCREEN, POKE 752,1 =SYSTEM CURSOR OFF 5 X=X+1:? B$;A$(X,X);:IF X=4 THEN X=0:REM BUSY CURSOR 6 RETURN 10 P=1:F=1.3:G=1:L=0:REM SORT SUBROUTINE 13 L=L+1:P=P*F:G=INT(N/P):IF G<1 THEN G=1 14 NW=N-G:? "PASS ";L;" GAP ";G;" ";:IF G=1 THEN S=1 15 FOR I=0 TO NW-1:IF N$(S(B(I)),F(B(I)))<=N$(S(B(I+G)),F(B(I+G))) THEN GOTO 20 17 T=B(I):B(I)=B(I+G):B(I+G)=T:S=0 20 GOSUB 5 21 NEXT I:IF S=1 THEN RETURN 22 ? B$:GOTO 13 25 ? :? "CHECKING SORT... ";:R=0:FOR I=0 TO N-2:REM CHECK SORT ORDER ROUTINE 27 IF N$(S(B(I)),F(B(I)))>N$(S(B(I+1)),F(B(I+1))) THEN ? "OUT OF ORDER ";N$(S(B(I)),F(B(I))):R=1 30 GOSUB 5:NEXT I:? B$:? :RETURN 40 FOR I=0 TO N-1:? N$(S(B(I)),F(B(I)));" ";:NEXT I:RETURN 44 REM MAIN 45 N=0:A$(1)=CHR$(22):A$(2)=CHR$(13):A$(3)=CHR$(2):A$(4)=CHR$(14):B$=CHR$(126):CLS$=CHR$(125) 55 ? CLS$:? "COMB SORT MOST POPULAR SURNAMES":? :? "LOADING DATA... "; 60 READ K$,C,D,E:IF K$="$$$$" THEN GOTO 70 61 GOSUB 5:REM BUSY CURSOR 62 S(N)=LEN(N$)+1:N$(LEN(N$)+1)=K$:F(N)=LEN(N$):L=L+LEN(K$):B(N)=N:N=N+1:GOTO 60 70 ? B$:? N;" NAMES LOADED":? "TOTAL LENGTH ";L;" BYTES":? 88 GOSUB 10:? B$:REM SORT ROUTINE 90 GOSUB 25:REM CHECK SORT ORDER 92 GOSUB 40:REM PRINT SORTED LIST 95 ? :? :? "DONE":POKE 752,0:END 100 DATA SMITH,2501922,1.006,1,JOHNSON,2014470,.81,2,WILLIAMS,1738413,.699,3 101 DATA JONES,1544427,.621,4,BROWN,1544427,.621,5,DAVIS,1193760,.48,6 102 DATA MILLER,1054488,.424,7,WILSON,843093,.339,8,MOORE,775944,.312,9 103 DATA TAYLOR,773457,.311,10,ANDERSON,773457,.311,11,THOMAS,773457,.311,12 104 DATA JACKSON,770970,.31,13,WHITE,693873,.279,14,HARRIS,683925,.275,15 105 DATA MARTIN,678951,.273,16,THOMPSON,669003,.269,17,GARCIA,631698,.254,18 106 DATA MARTINEZ,581958,.234,19,ROBINSON,579471,.233,20,CLARK,574497,.231,21 107 DATA RODRIGUEZ,569523,.229,22,LEWIS,562062,.226,23,LEE,547140,.22,24 108 DATA WALKER,544653,.219,25,HALL,497400,.2,26,ALLEN,494913,.199,27 109 DATA YOUNG,479991,.193,28,HERNANDEZ,477504,.192,29,KING,472530,.19,30 110 DATA WRIGHT,470043,.189,31,LOPEZ,465069,.187,32,HILL,465069,.187,33 111 DATA SCOTT,460095,.185,34,GREEN,455121,.183,35,ADAMS,432738,.174,36 112 DATA BAKER,425277,.171,37,GONZALEZ,412842,.166,38,NELSON,402894,.162,39 113 DATA CARTER,402894,.162,40,MITCHELL,397920,.16,41,PEREZ,385485,.155,42 114 DATA ROBERTS,380511,.153,43,TURNER,378024,.152,44,PHILLIPS,370563,.149,45 115 DATA CAMPBELL,370563,.149,46,PARKER,363102,.146,47,EVANS,350667,.141,48 116 DATA EDWARDS,340719,.137,49,COLLINS,333258,.134,50,STEWART,330771,.133,51 117 DATA SANCHEZ,323310,.13,52,MORRIS,310875,.125,53,ROGERS,305901,.123,54 118 DATA REED,303414,.122,55,COOK,298440,.12,56,MORGAN,293466,.118,57 119 DATA BELL,290979,.117,58,MURPHY,290979,.117,59,BAILEY,286005,.115,60 120 DATA RIVERA,281031,.113,61,COOPER,281031,.113,62,RICHARDSON,278544,.112,63 121 DATA COX,273570,.11,64,HOWARD,273570,.11,65,WARD,268596,.108,66 122 DATA TORRES,268596,.108,67,PETERSON,266109,.107,68,GRAY,263622,.106,69 123 DATA RAMIREZ,261135,.105,70,JAMES,261135,.105,71,WATSON,256161,.103,72 124 DATA BROOKS,256161,.103,73,KELLY,253674,.102,74,SANDERS,248700,.1,75 125 DATA PRICE,246213,.099,76,BENNETT,246213,.099,77,WOOD,243726,.098,78 126 DATA BARNES,241239,.097,79,ROSS,238752,.096,80,HENDERSON,236265,.095,81 127 DATA COLEMAN,236265,.095,82,JENKINS,236265,.095,83,PERRY,233778,.094,84 128 DATA POWELL,231291,.093,85,LONG,228804,.092,86,PATTERSON,228804,.092,87 129 DATA HUGHES,228804,.092,88,FLORES,228804,.092,89,WASHINGTON,228804,.092,90 130 DATA BUTLER,226317,.091,91,SIMMONS,226317,.091,92,FOSTER,226317,.091,93 131 DATA GONZALES,216369,.087,94,BRYANT,216369,.087,95,ALEXANDER,211395,.085,96 132 DATA RUSSELL,211395,.085,97,GRIFFIN,208908,.084,98,DIAZ,208908,.084,99 133 DATA HAYES,206421,.083,100,MYERS,206421,.083,101,FORD,203934,.082,102 134 DATA HAMILTON,203934,.082,103,GRAHAM,203934,.082,104,SULLIVAN,201447,.081,105 135 DATA WALLACE,201447,.081,106,WOODS,198960,.08,107,COLE,198960,.08,108 136 DATA WEST,198960,.08,109,JORDAN,193986,.078,110,OWENS,193986,.078,111 137 DATA REYNOLDS,193986,.078,112,FISHER,191499,.077,113,ELLIS,191499,.077,114 138 DATA HARRISON,189012,.076,115,GIBSON,186525,.075,116,MCDONALD,186525,.075,117 139 DATA CRUZ,186525,.075,118,MARSHALL,186525,.075,119,ORTIZ,186525,.075,120 140 DATA GOMEZ,186525,.075,121,MURRAY,184038,.074,122,FREEMAN,184038,.074,123 141 DATA WELLS,181551,.073,124,WEBB,179064,.072,125,SIMPSON,174090,.07,126 142 DATA STEVENS,174090,.07,127,TUCKER,174090,.07,128,PORTER,171603,.069,129 143 DATA HUNTER,171603,.069,130,HICKS,171603,.069,131,CRAWFORD,169116,.068,132 144 DATA HENRY,169116,.068,133,BOYD,169116,.068,134,MASON,169116,.068,135 145 DATA MORALES,166629,.067,136,KENNEDY,166629,.067,137,WARREN,166629,.067,138 146 DATA DIXON,164142,.066,139,RAMOS,164142,.066,140,REYES,164142,.066,141 147 DATA BURNS,161655,.065,142,GORDON,161655,.065,143,SHAW,161655,.065,144 148 DATA HOLMES,161655,.065,145,RICE,159168,.064,146,ROBERTSON,159168,.064,147 149 DATA HUNT,156681,.063,148,BLACK,156681,.063,149,DANIELS,154194,.062,150 150 DATA PALMER,154194,.062,151,MILLS,151707,.061,152,NICHOLS,149220,.06,153 151 DATA GRANT,149220,.06,154,KNIGHT,149220,.06,155,FERGUSON,146733,.059,156 152 DATA ROSE,146733,.059,157,STONE,146733,.059,158,HAWKINS,146733,.059,159 153 DATA DUNN,144246,.058,160,PERKINS,144246,.058,161,HUDSON,144246,.058,162 154 DATA SPENCER,141759,.057,163,GARDNER,141759,.057,164,STEPHENS,141759,.057,165 155 DATA PAYNE,141759,.057,166,PIERCE,139272,.056,167,BERRY,139272,.056,168 156 DATA MATTHEWS,139272,.056,169,ARNOLD,139272,.056,170,WAGNER,136785,.055,171 157 DATA WILLIS,136785,.055,172,RAY,136785,.055,173,WATKINS,136785,.055,174 158 DATA OLSON,136785,.055,175,CARROLL,136785,.055,176,DUNCAN,136785,.055,177 159 DATA SNYDER,136785,.055,178,HART,134298,.054,179,CUNNINGHAM,134298,.054,180 160 DATA BRADLEY,134298,.054,181,LANE,134298,.054,182,ANDREWS,134298,.054,183 161 DATA RUIZ,134298,.054,184,HARPER,134298,.054,185,FOX,131811,.053,186 162 DATA RILEY,131811,.053,187,ARMSTRONG,131811,.053,188,CARPENTER,131811,.053,189 163 DATA WEAVER,131811,.053,190,GREENE,131811,.053,191,LAWRENCE,129324,.052,192 164 DATA ELLIOTT,129324,.052,193,CHAVEZ,129324,.052,194,SIMS,129324,.052,195 165 DATA AUSTIN,129324,.052,196,PETERS,129324,.052,197,KELLEY,129324,.052,198 166 DATA FRANKLIN,126837,.051,199,LAWSON,126837,.051,200,FIELDS,126837,.051,201 167 DATA GUTIERREZ,126837,.051,202,RYAN,126837,.051,203,SCHMIDT,126837,.051,204 168 DATA CARR,126837,.051,205,VASQUEZ,126837,.051,206,CASTILLO,126837,.051,207 169 DATA WHEELER,126837,.051,208,CHAPMAN,124350,.05,209,OLIVER,124350,.05,210 170 DATA MONTGOMERY,121863,.049,211,RICHARDS,121863,.049,212,WILLIAMSON,121863,.049,213 171 DATA JOHNSTON,121863,.049,214,BANKS,119376,.048,215,MEYER,119376,.048,216 172 DATA BISHOP,119376,.048,217,MCCOY,119376,.048,218,HOWELL,119376,.048,219 173 DATA ALVAREZ,119376,.048,220,MORRISON,119376,.048,221,HANSEN,116889,.047,222 174 DATA FERNANDEZ,116889,.047,223,GARZA,116889,.047,224,HARVEY,116889,.047,225 175 DATA LITTLE,114402,.046,226,BURTON,114402,.046,227,STANLEY,114402,.046,228 176 DATA NGUYEN,114402,.046,229,GEORGE,114402,.046,230,JACOBS,114402,.046,231 177 DATA REID,114402,.046,232,KIM,111915,.045,233,FULLER,111915,.045,234 178 DATA LYNCH,111915,.045,235,DEAN,111915,.045,236,GILBERT,111915,.045,237 179 DATA GARRETT,111915,.045,238,ROMERO,111915,.045,239,WELCH,109428,.044,240 180 DATA LARSON,109428,.044,241,FRAZIER,109428,.044,242,BURKE,109428,.044,243 181 DATA HANSON,106941,.043,244,DAY,106941,.043,245,MENDOZA,106941,.043,246 182 DATA MORENO,106941,.043,247,BOWMAN,106941,.043,248,MEDINA,104454,.042,249 183 DATA FOWLER,104454,.042,250,BREWER,104454,.042,251,HOFFMAN,104454,.042,252 184 DATA CARLSON,104454,.042,253,SILVA,104454,.042,254,PEARSON,104454,.042,255 185 DATA HOLLAND,104454,.042,256,DOUGLAS,101967,.041,257,FLEMING,101967,.041,258 186 DATA JENSEN,101967,.041,259,VARGAS,101967,.041,260,BYRD,101967,.041,261 187 DATA DAVIDSON,101967,.041,262,HOPKINS,101967,.041,263,MAY,99480,.04,264 188 DATA TERRY,99480,.04,265,HERRERA,99480,.04,266,WADE,99480,.04,267 189 DATA SOTO,99480,.04,268,WALTERS,99480,.04,269,CURTIS,99480,.04,270 190 DATA NEAL,96993,.039,271,CALDWELL,96993,.039,272,LOWE,96993,.039,273 191 DATA JENNINGS,96993,.039,274,BARNETT,96993,.039,275,GRAVES,96993,.039,276 192 DATA JIMENEZ,96993,.039,277,HORTON,96993,.039,278,SHELTON,96993,.039,279 193 DATA BARRETT,96993,.039,280,OBRIEN,96993,.039,281,CASTRO,96993,.039,282 194 DATA SUTTON,94506,.038,283,GREGORY,94506,.038,284,MCKINNEY,94506,.038,285 195 DATA LUCAS,94506,.038,286,MILES,94506,.038,287,CRAIG,94506,.038,288 196 DATA RODRIQUEZ,92019,.037,289,CHAMBERS,92019,.037,290,HOLT,92019,.037,291 197 DATA LAMBERT,92019,.037,292,FLETCHER,92019,.037,293,WATTS,92019,.037,294 198 DATA BATES,92019,.037,295,HALE,92019,.037,296,RHODES,92019,.037,297 199 DATA PENA,92019,.037,298,BECK,92019,.037,299,NEWMAN,89532,.036,300 1000 DATA $$$$,0,0,0 1001 REM END OF DATA Even though the Atari clock speed is higher, plus your version doesn't scan the data to find out how large the array is, and after I removed the busy indicator... standard MS BASIC on the MC-10 beats it. I ran the test on Altirra 3.1, with Altirra BASIC. Loading the array was pretty fast, but the sort... not so much. Oh, and pasting the text into the Altirra emulator is excruciatingly slow. It takes about 15 seconds to load the original program on VMC-10. I might be able to make coffee with the Atari. Is there a faster way to enter the program? Here's how it compares as written. Keep in mind that the Atari code is unoptimized, and even dropping the busy indicator makes a noticeable difference, so don't worry too much about this version being slower. Standard MS BASIC is also closer to the speed of the Atari. I guess I should worry about how the output of mine looks... it's kinda ugly in comparison. In my defense, it was a quick n dirty test. Edited July 27, 2019 by JamesD changed optimized to unoptimized, oops Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted July 27, 2019 Share Posted July 27, 2019 54 minutes ago, JamesD said: Is there a faster way to enter the program? Try running the emulator in Warp Speed (or simply holding down the F1 key). Pastes into Altirra BASIC in a minute or less. 2 Quote Link to comment Share on other sites More sharing options...
drpeter Posted July 27, 2019 Share Posted July 27, 2019 (edited) OK, so here is an even slower but memory-optimised version that can sort the full 891 names on the Atari so long as no DOS is loaded. It achieves this by implementing the numeric arrays as word arrays within strings. Because of the BASIC routines to manipulate the strings and arrays, this will inevitably be much slower than MS BASIC. MS BASIC on the Atari is generally much faster natively than ATARI BASIC in any case, as I recall. And here we're deliberately disadvantaging ATARI BASIC by focusing on a task it's not best suited for. Altirra BASIC is faster than ATARI BASIC- in this instance it does the actual sort in ~50 mins vs 80 mins with no fast OS patches activated. You can load the program quickly into Altirra by saving it as a text file e.g. SORT.LST in ATASCII format from the Windows Memo-pad http://joyfulcoder.com/memopad/ and using e.g. ENTER "H:SORT.LST" in Altirra after installing the H: driver under System->Configure System->Peripherals->Devices Spoiler 0 DIM K$(50),N$(5457):DIM S$(1784),O$(1782):POKE 752,1:DIM A$(4),B$(1),CLS$(1):GOTO 45 1 K=K*2+1:Z=INT(Y/256):S$(K,K)=CHR$(Z):S$(K+1,K+1)=CHR$(Y-Z*256):RETURN 2 K=K*2+1:Y=ASC(S$(K))*256+ASC(S$(K+1)):RETURN 3 K=K*2+1:Z=INT(Y/256):O$(K,K)=CHR$(Z):O$(K+1,K+1)=CHR$(Y-Z*256):RETURN 4 K=K*2+1:Y=ASC(O$(K))*256+ASC(O$(K+1)):RETURN 5 X=X+1:? B$;A$(X,X);:IF X=4 THEN X=0:REM BUSY CURSOR 6 RETURN 10 P=1:F=1.3:G=1:L=0:REM SORT SUBROUTINE 13 L=L+1:P=P*F:G=INT(N/P):IF G<1 THEN G=1 14 NW=N-G:? "PASS ";L;" GAP ";G;" ";:IF G=1 THEN S=1 15 FOR I=0 TO NW-1:K=I:GOSUB 4:Q=Y:K=Y:GOSUB 2:S1=Y:K=Q+1:GOSUB 2:F1=Y-1 16 K=I+G:GOSUB 4:Q=Y:K=Y:GOSUB 2:S2=Y:K=Q+1:GOSUB 2:F2=Y-1 18 IF N$(S1,F1)<=N$(S2,F2) THEN GOTO 20 19 K=I:GOSUB 4:T=Y:K=I+G:GOSUB 4:K=I:GOSUB 3:K=I+G:Y=T:GOSUB 3:S=0 20 GOSUB 5:REM BUSY CURSOR 21 NEXT I:IF S=1 THEN RETURN 22 ? B$:GOTO 13 25 ? : ? "CHECKING SORT... ";:R=0:FOR I=0 TO N-2:REM CHECK SORT ORDER ROUTINE 26 K=I:GOSUB 4:Q=Y:K=Y:GOSUB 2:S1=Y:K=Q+1:GOSUB 2:F1=Y-1 27 K=I+1:GOSUB 4:Q=Y:K=Y:GOSUB 2:S2=Y:K=Q+1:GOSUB 2:F2=Y-1 29 IF N$(S1,F1)>N$(S2,F2) THEN ? "OUT OF ORDER ";N$(S1,F1):R=1 30 GOSUB 5:NEXT I:? B$;:IF R=0 THEN ? "OK"; 32 ? : ? :RETURN 40 FOR I=0 TO N-1:K=I:GOSUB 4:Q=Y:K=Y:GOSUB 2:S1=Y:K=Q+1:GOSUB 2:F1=Y-1 42 ? N$(S1,F1);" ";:NEXT I:RETURN 44 REM MAIN 45 N=0:A$(1)=CHR$(22):A$(2)=CHR$(13):A$(3)=CHR$(2):A$(4)=CHR$(14):B$=CHR$(126):CLS$=CHR$(125) 51 REM K$=TEMP,N$=NAME ARRAY,S$=SUBSTRING START PTRS,O$=SORT SEQUENCE 52 REM A$=CHARACTERS FOR BUSY CURSOR 53 REM B$=BACKSPACE, CLS$=CLEAR SCREEN, POKE 752,1 =SYSTEM CURSOR OFF 55 ? CLS$:? "COMB SORT MOST POPULAR SURNAMES":? : ? "LOADING DATA... "; 60 READ K$,C,D,E:IF K$="$$$$" THEN GOTO 70 61 GOSUB 5:REM BUSY CURSOR ROUTINE 62 K=N:Y=LEN(N$)+1:GOSUB 1:N$(LEN(N$)+1)=K$:L=L+LEN(K$):K=N:Y=N:GOSUB 3:N=N+1:GOTO 60 70 K=N:Y=LEN(N$)+1:GOSUB 1:? B$:? N;" NAMES LOADED":? "TOTAL LENGTH ";L;" BYTES":? 86 TT=PEEK(20)+PEEK(19)*256+PEEK(18)*256*256 88 GOSUB 10:? B$:REM SORT ROUTINE 89 IF PEEK(20)>200 THEN GOTO 89 90 TT=PEEK(20)+PEEK(19)*256+PEEK(18)*256*256-TT 91 GOSUB 25:REM CHECK SORT ORDER 92 GOSUB 40:REM PRINT SORTED LIST 96 ? : ? : ?"SORT TOOK ";INT(TT/50);" SECONDS" 98 ? : ? "DONE":POKE 752,0:END 100 DATA SMITH,2501922,1.006,1,JOHNSON,2014470,.81,2,WILLIAMS,1738413,.699,3 101 DATA JONES,1544427,.621,4,BROWN,1544427,.621,5,DAVIS,1193760,.48,6 102 DATA MILLER,1054488,.424,7,WILSON,843093,.339,8,MOORE,775944,.312,9 103 DATA TAYLOR,773457,.311,10,ANDERSON,773457,.311,11,THOMAS,773457,.311,12 104 DATA JACKSON,770970,.31,13,WHITE,693873,.279,14,HARRIS,683925,.275,15 105 DATA MARTIN,678951,.273,16,THOMPSON,669003,.269,17,GARCIA,631698,.254,18 106 DATA MARTINEZ,581958,.234,19,ROBINSON,579471,.233,20,CLARK,574497,.231,21 107 DATA RODRIGUEZ,569523,.229,22,LEWIS,562062,.226,23,LEE,547140,.22,24 108 DATA WALKER,544653,.219,25,HALL,497400,.2,26,ALLEN,494913,.199,27 109 DATA YOUNG,479991,.193,28,HERNANDEZ,477504,.192,29,KING,472530,.19,30 110 DATA WRIGHT,470043,.189,31,LOPEZ,465069,.187,32,HILL,465069,.187,33 111 DATA SCOTT,460095,.185,34,GREEN,455121,.183,35,ADAMS,432738,.174,36 112 DATA BAKER,425277,.171,37,GONZALEZ,412842,.166,38,NELSON,402894,.162,39 113 DATA CARTER,402894,.162,40,MITCHELL,397920,.16,41,PEREZ,385485,.155,42 114 DATA ROBERTS,380511,.153,43,TURNER,378024,.152,44,PHILLIPS,370563,.149,45 115 DATA CAMPBELL,370563,.149,46,PARKER,363102,.146,47,EVANS,350667,.141,48 116 DATA EDWARDS,340719,.137,49,COLLINS,333258,.134,50,STEWART,330771,.133,51 117 DATA SANCHEZ,323310,.13,52,MORRIS,310875,.125,53,ROGERS,305901,.123,54 118 DATA REED,303414,.122,55,COOK,298440,.12,56,MORGAN,293466,.118,57 119 DATA BELL,290979,.117,58,MURPHY,290979,.117,59,BAILEY,286005,.115,60 120 DATA RIVERA,281031,.113,61,COOPER,281031,.113,62,RICHARDSON,278544,.112,63 121 DATA COX,273570,.11,64,HOWARD,273570,.11,65,WARD,268596,.108,66 122 DATA TORRES,268596,.108,67,PETERSON,266109,.107,68,GRAY,263622,.106,69 123 DATA RAMIREZ,261135,.105,70,JAMES,261135,.105,71,WATSON,256161,.103,72 124 DATA BROOKS,256161,.103,73,KELLY,253674,.102,74,SANDERS,248700,.1,75 125 DATA PRICE,246213,.099,76,BENNETT,246213,.099,77,WOOD,243726,.098,78 126 DATA BARNES,241239,.097,79,ROSS,238752,.096,80,HENDERSON,236265,.095,81 127 DATA COLEMAN,236265,.095,82,JENKINS,236265,.095,83,PERRY,233778,.094,84 128 DATA POWELL,231291,.093,85,LONG,228804,.092,86,PATTERSON,228804,.092,87 129 DATA HUGHES,228804,.092,88,FLORES,228804,.092,89,WASHINGTON,228804,.092,90 130 DATA BUTLER,226317,.091,91,SIMMONS,226317,.091,92,FOSTER,226317,.091,93 131 DATA GONZALES,216369,.087,94,BRYANT,216369,.087,95,ALEXANDER,211395,.085,96 132 DATA RUSSELL,211395,.085,97,GRIFFIN,208908,.084,98,DIAZ,208908,.084,99 133 DATA HAYES,206421,.083,100,MYERS,206421,.083,101,FORD,203934,.082,102 134 DATA HAMILTON,203934,.082,103,GRAHAM,203934,.082,104,SULLIVAN,201447,.081,105 135 DATA WALLACE,201447,.081,106,WOODS,198960,.08,107,COLE,198960,.08,108 136 DATA WEST,198960,.08,109,JORDAN,193986,.078,110,OWENS,193986,.078,111 137 DATA REYNOLDS,193986,.078,112,FISHER,191499,.077,113,ELLIS,191499,.077,114 138 DATA HARRISON,189012,.076,115,GIBSON,186525,.075,116,MCDONALD,186525,.075,117 139 DATA CRUZ,186525,.075,118,MARSHALL,186525,.075,119,ORTIZ,186525,.075,120 140 DATA GOMEZ,186525,.075,121,MURRAY,184038,.074,122,FREEMAN,184038,.074,123 141 DATA WELLS,181551,.073,124,WEBB,179064,.072,125,SIMPSON,174090,.07,126 142 DATA STEVENS,174090,.07,127,TUCKER,174090,.07,128,PORTER,171603,.069,129 143 DATA HUNTER,171603,.069,130,HICKS,171603,.069,131,CRAWFORD,169116,.068,132 144 DATA HENRY,169116,.068,133,BOYD,169116,.068,134,MASON,169116,.068,135 145 DATA MORALES,166629,.067,136,KENNEDY,166629,.067,137,WARREN,166629,.067,138 146 DATA DIXON,164142,.066,139,RAMOS,164142,.066,140,REYES,164142,.066,141 147 DATA BURNS,161655,.065,142,GORDON,161655,.065,143,SHAW,161655,.065,144 148 DATA HOLMES,161655,.065,145,RICE,159168,.064,146,ROBERTSON,159168,.064,147 149 DATA HUNT,156681,.063,148,BLACK,156681,.063,149,DANIELS,154194,.062,150 150 DATA PALMER,154194,.062,151,MILLS,151707,.061,152,NICHOLS,149220,.06,153 151 DATA GRANT,149220,.06,154,KNIGHT,149220,.06,155,FERGUSON,146733,.059,156 152 DATA ROSE,146733,.059,157,STONE,146733,.059,158,HAWKINS,146733,.059,159 153 DATA DUNN,144246,.058,160,PERKINS,144246,.058,161,HUDSON,144246,.058,162 154 DATA SPENCER,141759,.057,163,GARDNER,141759,.057,164,STEPHENS,141759,.057,165 155 DATA PAYNE,141759,.057,166,PIERCE,139272,.056,167,BERRY,139272,.056,168 156 DATA MATTHEWS,139272,.056,169,ARNOLD,139272,.056,170,WAGNER,136785,.055,171 157 DATA WILLIS,136785,.055,172,RAY,136785,.055,173,WATKINS,136785,.055,174 158 DATA OLSON,136785,.055,175,CARROLL,136785,.055,176,DUNCAN,136785,.055,177 159 DATA SNYDER,136785,.055,178,HART,134298,.054,179,CUNNINGHAM,134298,.054,180 160 DATA BRADLEY,134298,.054,181,LANE,134298,.054,182,ANDREWS,134298,.054,183 161 DATA RUIZ,134298,.054,184,HARPER,134298,.054,185,FOX,131811,.053,186 162 DATA RILEY,131811,.053,187,ARMSTRONG,131811,.053,188,CARPENTER,131811,.053,189 163 DATA WEAVER,131811,.053,190,GREENE,131811,.053,191,LAWRENCE,129324,.052,192 164 DATA ELLIOTT,129324,.052,193,CHAVEZ,129324,.052,194,SIMS,129324,.052,195 165 DATA AUSTIN,129324,.052,196,PETERS,129324,.052,197,KELLEY,129324,.052,198 166 DATA FRANKLIN,126837,.051,199,LAWSON,126837,.051,200,FIELDS,126837,.051,201 167 DATA GUTIERREZ,126837,.051,202,RYAN,126837,.051,203,SCHMIDT,126837,.051,204 168 DATA CARR,126837,.051,205,VASQUEZ,126837,.051,206,CASTILLO,126837,.051,207 169 DATA WHEELER,126837,.051,208,CHAPMAN,124350,.05,209,OLIVER,124350,.05,210 170 DATA MONTGOMERY,121863,.049,211,RICHARDS,121863,.049,212,WILLIAMSON,121863,.049,213 171 DATA JOHNSTON,121863,.049,214,BANKS,119376,.048,215,MEYER,119376,.048,216 172 DATA BISHOP,119376,.048,217,MCCOY,119376,.048,218,HOWELL,119376,.048,219 173 DATA ALVAREZ,119376,.048,220,MORRISON,119376,.048,221,HANSEN,116889,.047,222 174 DATA FERNANDEZ,116889,.047,223,GARZA,116889,.047,224,HARVEY,116889,.047,225 175 DATA LITTLE,114402,.046,226,BURTON,114402,.046,227,STANLEY,114402,.046,228 176 DATA NGUYEN,114402,.046,229,GEORGE,114402,.046,230,JACOBS,114402,.046,231 177 DATA REID,114402,.046,232,KIM,111915,.045,233,FULLER,111915,.045,234 178 DATA LYNCH,111915,.045,235,DEAN,111915,.045,236,GILBERT,111915,.045,237 179 DATA GARRETT,111915,.045,238,ROMERO,111915,.045,239,WELCH,109428,.044,240 180 DATA LARSON,109428,.044,241,FRAZIER,109428,.044,242,BURKE,109428,.044,243 181 DATA HANSON,106941,.043,244,DAY,106941,.043,245,MENDOZA,106941,.043,246 182 DATA MORENO,106941,.043,247,BOWMAN,106941,.043,248,MEDINA,104454,.042,249 183 DATA FOWLER,104454,.042,250,BREWER,104454,.042,251,HOFFMAN,104454,.042,252 184 DATA CARLSON,104454,.042,253,SILVA,104454,.042,254,PEARSON,104454,.042,255 185 DATA HOLLAND,104454,.042,256,DOUGLAS,101967,.041,257,FLEMING,101967,.041,258 186 DATA JENSEN,101967,.041,259,VARGAS,101967,.041,260,BYRD,101967,.041,261 187 DATA DAVIDSON,101967,.041,262,HOPKINS,101967,.041,263,MAY,99480,.04,264 188 DATA TERRY,99480,.04,265,HERRERA,99480,.04,266,WADE,99480,.04,267 189 DATA SOTO,99480,.04,268,WALTERS,99480,.04,269,CURTIS,99480,.04,270 190 DATA NEAL,96993,.039,271,CALDWELL,96993,.039,272,LOWE,96993,.039,273 191 DATA JENNINGS,96993,.039,274,BARNETT,96993,.039,275,GRAVES,96993,.039,276 192 DATA JIMENEZ,96993,.039,277,HORTON,96993,.039,278,SHELTON,96993,.039,279 193 DATA BARRETT,96993,.039,280,OBRIEN,96993,.039,281,CASTRO,96993,.039,282 194 DATA SUTTON,94506,.038,283,GREGORY,94506,.038,284,MCKINNEY,94506,.038,285 195 DATA LUCAS,94506,.038,286,MILES,94506,.038,287,CRAIG,94506,.038,288 196 DATA RODRIQUEZ,92019,.037,289,CHAMBERS,92019,.037,290,HOLT,92019,.037,291 197 DATA LAMBERT,92019,.037,292,FLETCHER,92019,.037,293,WATTS,92019,.037,294 198 DATA BATES,92019,.037,295,HALE,92019,.037,296,RHODES,92019,.037,297 199 DATA PENA,92019,.037,298,BECK,92019,.037,299,NEWMAN,89532,.036,300 200 DATA HAYNES,89532,.036,301,MCDANIEL,89532,.036,302,MENDEZ,89532,.036,303 201 DATA BUSH,89532,.036,304,VAUGHN,89532,.036,305,PARKS,87045,.035,306 202 DATA DAWSON,87045,.035,307,SANTIAGO,87045,.035,308,NORRIS,87045,.035,309 203 DATA HARDY,87045,.035,310,LOVE,87045,.035,311,STEELE,87045,.035,312 204 DATA CURRY,87045,.035,313,POWERS,87045,.035,314,SCHULTZ,87045,.035,315 205 DATA BARKER,87045,.035,316,GUZMAN,84558,.034,317,PAGE,84558,.034,318 206 DATA MUNOZ,84558,.034,319,BALL,84558,.034,320,KELLER,84558,.034,321 207 DATA CHANDLER,84558,.034,322,WEBER,84558,.034,323,LEONARD,84558,.034,324 208 DATA WALSH,82071,.033,325,LYONS,82071,.033,326,RAMSEY,82071,.033,327 209 DATA WOLFE,82071,.033,328,SCHNEIDER,82071,.033,329,MULLINS,82071,.033,330 210 DATA BENSON,82071,.033,331,SHARP,82071,.033,332,BOWEN,82071,.033,333 211 DATA DANIEL,82071,.033,334,BARBER,79584,.032,335,CUMMINGS,79584,.032,336 212 DATA HINES,79584,.032,337,BALDWIN,79584,.032,338,GRIFFITH,79584,.032,339 213 DATA VALDEZ,79584,.032,340,HUBBARD,79584,.032,341,SALAZAR,79584,.032,342 214 DATA REEVES,79584,.032,343,WARNER,77097,.031,344,STEVENSON,77097,.031,345 215 DATA BURGESS,77097,.031,346,SANTOS,77097,.031,347,TATE,77097,.031,348 216 DATA CROSS,77097,.031,349,GARNER,77097,.031,350,MANN,77097,.031,351 217 DATA MACK,77097,.031,352,MOSS,77097,.031,353,THORNTON,77097,.031,354 218 DATA DENNIS,77097,.031,355,MCGEE,77097,.031,356,FARMER,74610,.03,357 219 DATA DELGADO,74610,.03,358,AGUILAR,74610,.03,359,VEGA,74610,.03,360 220 DATA GLOVER,74610,.03,361,MANNING,74610,.03,362,COHEN,74610,.03,363 221 DATA HARMON,74610,.03,364,RODGERS,74610,.03,365,ROBBINS,74610,.03,366 222 DATA NEWTON,74610,.03,367,TODD,74610,.03,368,BLAIR,74610,.03,369 223 DATA HIGGINS,74610,.03,370,INGRAM,74610,.03,371,REESE,74610,.03,372 224 DATA CANNON,74610,.03,373,STRICKLAND,74610,.03,374,TOWNSEND,74610,.03,375 225 DATA POTTER,74610,.03,376,GOODWIN,74610,.03,377,WALTON,74610,.03,378 226 DATA ROWE,72123,.029,379,HAMPTON,72123,.029,380,ORTEGA,72123,.029,381 227 DATA PATTON,72123,.029,382,SWANSON,72123,.029,383,JOSEPH,72123,.029,384 228 DATA FRANCIS,72123,.029,385,GOODMAN,72123,.029,386,MALDONADO,72123,.029,387 229 DATA YATES,72123,.029,388,BECKER,72123,.029,389,ERICKSON,72123,.029,390 230 DATA HODGES,72123,.029,391,RIOS,72123,.029,392,CONNER,72123,.029,393 231 DATA ADKINS,72123,.029,394,WEBSTER,69636,.028,395,NORMAN,69636,.028,396 232 DATA MALONE,69636,.028,397,HAMMOND,69636,.028,398,FLOWERS,69636,.028,399 233 DATA COBB,69636,.028,400,MOODY,69636,.028,401,QUINN,69636,.028,402 234 DATA BLAKE,69636,.028,403,MAXWELL,69636,.028,404,POPE,69636,.028,405 235 DATA FLOYD,67149,.027,406,OSBORNE,67149,.027,407,PAUL,67149,.027,408 236 DATA MCCARTHY,67149,.027,409,GUERRERO,67149,.027,410,LINDSEY,67149,.027,411 237 DATA ESTRADA,67149,.027,412,SANDOVAL,67149,.027,413,GIBBS,67149,.027,414 238 DATA TYLER,67149,.027,415,GROSS,67149,.027,416,FITZGERALD,67149,.027,417 239 DATA STOKES,67149,.027,418,DOYLE,67149,.027,419,SHERMAN,67149,.027,420 240 DATA SAUNDERS,67149,.027,421,WISE,67149,.027,422,COLON,67149,.027,423 241 DATA GILL,67149,.027,424,ALVARADO,67149,.027,425,GREER,64662,.026,426 242 DATA PADILLA,64662,.026,427,SIMON,64662,.026,428,WATERS,64662,.026,429 243 DATA NUNEZ,64662,.026,430,BALLARD,64662,.026,431,SCHWARTZ,64662,.026,432 244 DATA MCBRIDE,64662,.026,433,HOUSTON,64662,.026,434,CHRISTENSEN,64662,.026,435 245 DATA KLEIN,64662,.026,436,PRATT,64662,.026,437,BRIGGS,64662,.026,438 246 DATA PARSONS,64662,.026,439,MCLAUGHLIN,64662,.026,440,ZIMMERMAN,64662,.026,441 247 DATA FRENCH,64662,.026,442,BUCHANAN,64662,.026,443,MORAN,64662,.026,444 248 DATA COPELAND,62175,.025,445,ROY,62175,.025,446,PITTMAN,62175,.025,447 249 DATA BRADY,62175,.025,448,MCCORMICK,62175,.025,449,HOLLOWAY,62175,.025,450 250 DATA BROCK,62175,.025,451,POOLE,62175,.025,452,FRANK,62175,.025,453 251 DATA LOGAN,62175,.025,454,OWEN,62175,.025,455,BASS,62175,.025,456 252 DATA MARSH,62175,.025,457,DRAKE,62175,.025,458,WONG,62175,.025,459 253 DATA JEFFERSON,62175,.025,460,PARK,62175,.025,461,MORTON,62175,.025,462 254 DATA ABBOTT,62175,.025,463,SPARKS,62175,.025,464,PATRICK,59688,.024,465 255 DATA NORTON,59688,.024,466,HUFF,59688,.024,467,CLAYTON,59688,.024,468 256 DATA MASSEY,59688,.024,469,LLOYD,59688,.024,470,FIGUEROA,59688,.024,471 257 DATA CARSON,59688,.024,472,BOWERS,59688,.024,473,ROBERSON,59688,.024,474 258 DATA BARTON,59688,.024,475,TRAN,59688,.024,476,LAMB,59688,.024,477 259 DATA HARRINGTON,59688,.024,478,CASEY,59688,.024,479,BOONE,59688,.024,480 260 DATA CORTEZ,59688,.024,481,CLARKE,59688,.024,482,MATHIS,59688,.024,483 261 DATA SINGLETON,59688,.024,484,WILKINS,59688,.024,485,CAIN,59688,.024,486 262 DATA BRYAN,59688,.024,487,UNDERWOOD,59688,.024,488,HOGAN,59688,.024,489 263 DATA MCKENZIE,57201,.023,490,COLLIER,57201,.023,491,LUNA,57201,.023,492 264 DATA PHELPS,57201,.023,493,MCGUIRE,57201,.023,494,ALLISON,57201,.023,495 265 DATA BRIDGES,57201,.023,496,WILKERSON,57201,.023,497,NASH,57201,.023,498 266 DATA SUMMERS,57201,.023,499,ATKINS,57201,.023,500,WILCOX,57201,.023,501 267 DATA PITTS,57201,.023,502,CONLEY,57201,.023,503,MARQUEZ,57201,.023,504 268 DATA BURNETT,57201,.023,505,RICHARD,57201,.023,506,COCHRAN,57201,.023,507 269 DATA CHASE,57201,.023,508,DAVENPORT,57201,.023,509,HOOD,57201,.023,510 270 DATA GATES,57201,.023,511,CLAY,57201,.023,512,AYALA,57201,.023,513 271 DATA SAWYER,57201,.023,514,ROMAN,57201,.023,515,VAZQUEZ,57201,.023,516 272 DATA DICKERSON,57201,.023,517,HODGE,54714,.022,518,ACOSTA,54714,.022,519 273 DATA FLYNN,54714,.022,520,ESPINOZA,54714,.022,521,NICHOLSON,54714,.022,522 274 DATA MONROE,54714,.022,523,WOLF,54714,.022,524,MORROW,54714,.022,525 275 DATA KIRK,54714,.022,526,RANDALL,54714,.022,527,ANTHONY,54714,.022,528 276 DATA WHITAKER,54714,.022,529,OCONNOR,54714,.022,530,SKINNER,54714,.022,531 277 DATA WARE,54714,.022,532,MOLINA,54714,.022,533,KIRBY,54714,.022,534 278 DATA HUFFMAN,54714,.022,535,BRADFORD,54714,.022,536,CHARLES,54714,.022,537 279 DATA GILMORE,54714,.022,538,DOMINGUEZ,54714,.022,539,ONEAL,54714,.022,540 280 DATA BRUCE,54714,.022,541,LANG,52227,.021,542,COMBS,52227,.021,543 281 DATA KRAMER,52227,.021,544,HEATH,52227,.021,545,HANCOCK,52227,.021,546 282 DATA GALLAGHER,52227,.021,547,GAINES,52227,.021,548,SHAFFER,52227,.021,549 283 DATA SHORT,52227,.021,550,WIGGINS,52227,.021,551,MATHEWS,52227,.021,552 284 DATA MCCLAIN,52227,.021,553,FISCHER,52227,.021,554,WALL,52227,.021,555 285 DATA SMALL,52227,.021,556,MELTON,52227,.021,557,HENSLEY,52227,.021,558 286 DATA BOND,52227,.021,559,DYER,52227,.021,560,CAMERON,52227,.021,561 287 DATA GRIMES,52227,.021,562,CONTRERAS,52227,.021,563,CHRISTIAN,52227,.021,564 288 DATA WYATT,52227,.021,565,BAXTER,52227,.021,566,SNOW,52227,.021,567 289 DATA MOSLEY,52227,.021,568,SHEPHERD,52227,.021,569,LARSEN,52227,.021,570 290 DATA HOOVER,52227,.021,571,BEASLEY,49740,.02,572,GLENN,49740,.02,573 291 DATA PETERSEN,49740,.02,574,WHITEHEAD,49740,.02,575,MEYERS,49740,.02,576 292 DATA KEITH,49740,.02,577,GARRISON,49740,.02,578,VINCENT,49740,.02,579 293 DATA SHIELDS,49740,.02,580,HORN,49740,.02,581,SAVAGE,49740,.02,582 294 DATA OLSEN,49740,.02,583,SCHROEDER,49740,.02,584,HARTMAN,49740,.02,585 295 DATA WOODARD,49740,.02,586,MUELLER,49740,.02,587,KEMP,49740,.02,588 296 DATA DELEON,49740,.02,589,BOOTH,49740,.02,590,PATEL,49740,.02,591 297 DATA CALHOUN,49740,.02,592,WILEY,49740,.02,593,EATON,49740,.02,594 298 DATA CLINE,49740,.02,595,NAVARRO,49740,.02,596,HARRELL,49740,.02,597 299 DATA LESTER,49740,.02,598,HUMPHREY,49740,.02,599,PARRISH,49740,.02,600 300 DATA DURAN,49740,.02,601,HUTCHINSON,49740,.02,602,HESS,49740,.02,603 301 DATA DORSEY,49740,.02,604,BULLOCK,49740,.02,605,ROBLES,49740,.02,606 302 DATA BEARD,47253,.019,607,DALTON,47253,.019,608,AVILA,47253,.019,609 303 DATA VANCE,47253,.019,610,RICH,47253,.019,611,BLACKWELL,47253,.019,612 304 DATA YORK,47253,.019,613,JOHNS,47253,.019,614,BLANKENSHIP,47253,.019,615 305 DATA TREVINO,47253,.019,616,SALINAS,47253,.019,617,CAMPOS,47253,.019,618 306 DATA PRUITT,47253,.019,619,MOSES,47253,.019,620,CALLAHAN,47253,.019,621 307 DATA GOLDEN,47253,.019,622,MONTOYA,47253,.019,623,HARDIN,47253,.019,624 308 DATA GUERRA,47253,.019,625,MCDOWELL,47253,.019,626,CAREY,47253,.019,627 309 DATA STAFFORD,47253,.019,628,GALLEGOS,47253,.019,629,HENSON,47253,.019,630 310 DATA WILKINSON,47253,.019,631,BOOKER,47253,.019,632,MERRITT,47253,.019,633 311 DATA MIRANDA,47253,.019,634,ATKINSON,47253,.019,635,ORR,47253,.019,636 312 DATA DECKER,47253,.019,637,HOBBS,47253,.019,638,PRESTON,47253,.019,639 313 DATA TANNER,47253,.019,640,KNOX,47253,.019,641,PACHECO,47253,.019,642 314 DATA STEPHENSON,44766,.018,643,GLASS,44766,.018,644,ROJAS,44766,.018,645 315 DATA SERRANO,44766,.018,646,MARKS,44766,.018,647,HICKMAN,44766,.018,648 316 DATA ENGLISH,44766,.018,649,SWEENEY,44766,.018,650,STRONG,44766,.018,651 317 DATA PRINCE,44766,.018,652,MCCLURE,44766,.018,653,CONWAY,44766,.018,654 318 DATA WALTER,44766,.018,655,ROTH,44766,.018,656,MAYNARD,44766,.018,657 319 DATA FARRELL,44766,.018,658,LOWERY,44766,.018,659,HURST,44766,.018,660 320 DATA NIXON,44766,.018,661,WEISS,44766,.018,662,TRUJILLO,44766,.018,663 321 DATA ELLISON,44766,.018,664,SLOAN,44766,.018,665,JUAREZ,44766,.018,666 322 DATA WINTERS,44766,.018,667,MCLEAN,44766,.018,668,RANDOLPH,44766,.018,669 323 DATA LEON,44766,.018,670,BOYER,44766,.018,671,VILLARREAL,44766,.018,672 324 DATA MCCALL,44766,.018,673,GENTRY,44766,.018,674,CARRILLO,42279,.017,675 325 DATA KENT,42279,.017,676,AYERS,42279,.017,677,LARA,42279,.017,678 326 DATA SHANNON,42279,.017,679,SEXTON,42279,.017,680,PACE,42279,.017,681 327 DATA HULL,42279,.017,682,LEBLANC,42279,.017,683,BROWNING,42279,.017,684 328 DATA VELASQUEZ,42279,.017,685,LEACH,42279,.017,686,CHANG,42279,.017,687 329 DATA HOUSE,42279,.017,688,SELLERS,42279,.017,689,HERRING,42279,.017,690 330 DATA NOBLE,42279,.017,691,FOLEY,42279,.017,692,BARTLETT,42279,.017,693 331 DATA MERCADO,42279,.017,694,LANDRY,42279,.017,695,DURHAM,42279,.017,696 332 DATA WALLS,42279,.017,697,BARR,42279,.017,698,MCKEE,42279,.017,699 333 DATA BAUER,42279,.017,700,RIVERS,42279,.017,701,EVERETT,42279,.017,702 334 DATA BRADSHAW,42279,.017,703,PUGH,42279,.017,704,VELEZ,42279,.017,705 335 DATA RUSH,42279,.017,706,ESTES,42279,.017,707,DODSON,42279,.017,708 336 DATA MORSE,42279,.017,709,SHEPPARD,42279,.017,710,WEEKS,42279,.017,711 337 DATA CAMACHO,42279,.017,712,BEAN,42279,.017,713,BARRON,42279,.017,714 338 DATA LIVINGSTON,42279,.017,715,MIDDLETON,39792,.016,716,SPEARS,39792,.016,717 339 DATA BRANCH,39792,.016,718,BLEVINS,39792,.016,719,CHEN,39792,.016,720 340 DATA KERR,39792,.016,721,MCCONNELL,39792,.016,722,HATFIELD,39792,.016,723 341 DATA HARDING,39792,.016,724,ASHLEY,39792,.016,725,SOLIS,39792,.016,726 342 DATA HERMAN,39792,.016,727,FROST,39792,.016,728,GILES,39792,.016,729 343 DATA BLACKBURN,39792,.016,730,WILLIAM,39792,.016,731,PENNINGTON,39792,.016,732 344 DATA WOODWARD,39792,.016,733,FINLEY,39792,.016,734,MCINTOSH,39792,.016,735 345 DATA KOCH,39792,.016,736,BEST,39792,.016,737,SOLOMON,39792,.016,738 346 DATA MCCULLOUGH,39792,.016,739,DUDLEY,39792,.016,740,NOLAN,39792,.016,741 347 DATA BLANCHARD,39792,.016,742,RIVAS,39792,.016,743,BRENNAN,39792,.016,744 348 DATA MEJIA,39792,.016,745,KANE,39792,.016,746,BENTON,39792,.016,747 349 DATA JOYCE,39792,.016,748,BUCKLEY,39792,.016,749,HALEY,39792,.016,750 350 DATA VALENTINE,39792,.016,751,MADDOX,39792,.016,752,RUSSO,39792,.016,753 351 DATA MCKNIGHT,39792,.016,754,BUCK,39792,.016,755,MOON,39792,.016,756 352 DATA MCMILLAN,39792,.016,757,CROSBY,39792,.016,758,BERG,39792,.016,759 353 DATA DOTSON,39792,.016,760,MAYS,39792,.016,761,ROACH,39792,.016,762 354 DATA CHURCH,39792,.016,763,CHAN,39792,.016,764,RICHMOND,39792,.016,765 355 DATA MEADOWS,39792,.016,766,FAULKNER,39792,.016,767,ONEILL,39792,.016,768 356 DATA KNAPP,39792,.016,769,KLINE,37305,.015,770,BARRY,37305,.015,771 357 DATA OCHOA,37305,.015,772,JACOBSON,37305,.015,773,GAY,37305,.015,774 358 DATA AVERY,37305,.015,775,HENDRICKS,37305,.015,776,HORNE,37305,.015,777 359 DATA SHEPARD,37305,.015,778,HEBERT,37305,.015,779,CHERRY,37305,.015,780 360 DATA CARDENAS,37305,.015,781,MCINTYRE,37305,.015,782,WHITNEY,37305,.015,783 361 DATA WALLER,37305,.015,784,HOLMAN,37305,.015,785,DONALDSON,37305,.015,786 362 DATA CANTU,37305,.015,787,TERRELL,37305,.015,788,MORIN,37305,.015,789 363 DATA GILLESPIE,37305,.015,790,FUENTES,37305,.015,791,TILLMAN,37305,.015,792 364 DATA SANFORD,37305,.015,793,BENTLEY,37305,.015,794,PECK,37305,.015,795 365 DATA KEY,37305,.015,796,SALAS,37305,.015,797,ROLLINS,37305,.015,798 366 DATA GAMBLE,37305,.015,799,DICKSON,37305,.015,800,BATTLE,37305,.015,801 367 DATA SANTANA,37305,.015,802,CABRERA,37305,.015,803,CERVANTES,37305,.015,804 368 DATA HOWE,37305,.015,805,HINTON,37305,.015,806,HURLEY,37305,.015,807 369 DATA SPENCE,37305,.015,808,ZAMORA,37305,.015,809,YANG,37305,.015,810 370 DATA MCNEIL,37305,.015,811,SUAREZ,37305,.015,812,CASE,37305,.015,813 371 DATA PETTY,37305,.015,814,GOULD,37305,.015,815,MCFARLAND,37305,.015,816 372 DATA SAMPSON,37305,.015,817,CARVER,37305,.015,818,BRAY,37305,.015,819 373 DATA ROSARIO,37305,.015,820,MACDONALD,37305,.015,821,STOUT,37305,.015,822 374 DATA HESTER,37305,.015,823,MELENDEZ,37305,.015,824,DILLON,37305,.015,825 375 DATA FARLEY,37305,.015,826,HOPPER,37305,.015,827,GALLOWAY,37305,.015,828 376 DATA POTTS,37305,.015,829,BERNARD,37305,.015,830,JOYNER,34818,.014,831 377 DATA STEIN,34818,.014,832,AGUIRRE,34818,.014,833,OSBORN,34818,.014,834 378 DATA MERCER,34818,.014,835,BENDER,34818,.014,836,FRANCO,34818,.014,837 379 DATA ROWLAND,34818,.014,838,SYKES,34818,.014,839,BENJAMIN,34818,.014,840 380 DATA TRAVIS,34818,.014,841,PICKETT,34818,.014,842,CRANE,34818,.014,843 381 DATA SEARS,34818,.014,844,MAYO,34818,.014,845,DUNLAP,34818,.014,846 382 DATA HAYDEN,34818,.014,847,WILDER,34818,.014,848,MCKAY,34818,.014,849 383 DATA COFFEY,34818,.014,850,MCCARTY,34818,.014,851,EWING,34818,.014,852 384 DATA COOLEY,34818,.014,853,VAUGHAN,34818,.014,854,BONNER,34818,.014,855 385 DATA COTTON,34818,.014,856,HOLDER,34818,.014,857,STARK,34818,.014,858 386 DATA FERRELL,34818,.014,859,CANTRELL,34818,.014,860,FULTON,34818,.014,861 387 DATA LYNN,34818,.014,862,LOTT,34818,.014,863,CALDERON,34818,.014,864 388 DATA ROSA,34818,.014,865,POLLARD,34818,.014,866,HOOPER,34818,.014,867 389 DATA BURCH,34818,.014,868,MULLEN,34818,.014,869,FRY,34818,.014,870 390 DATA RIDDLE,34818,.014,871,LEVY,34818,.014,872,DAVID,34818,.014,873 391 DATA DUKE,34818,.014,874,ODONNELL,34818,.014,875,GUY,34818,.014,876 392 DATA MICHAEL,34818,.014,877,BRITT,34818,.014,878,FREDERICK,34818,.014,879 393 DATA DAUGHERTY,34818,.014,880,BERGER,34818,.014,881,DILLARD,34818,.014,882 394 DATA ALSTON,34818,.014,883,JARVIS,34818,.014,884,FRYE,34818,.014,885 395 DATA RIGGS,34818,.014,886,CHANEY,34818,.014,887,ODOM,32331,.013,888 396 DATA DUFFY,32331,.013,889,FITZPATRICK,32331,.013,890,VALENZUELA,32331,.013,891 1000 DATA $$$$,0,0,0 1001 REM END OF DATA Edited July 27, 2019 by drpeter Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 27, 2019 Share Posted July 27, 2019 Ditch the busy thing, it just steals too much CPU time on this much data. Neither interpreter has integer support, but I think difference on the first version comes down to the extra pointer overhead, and it being easier to convert between FLOAT and INT, than BCD and INT. If the data were written to a disk file instead of being read from data statements, you might be able to load the entire list using this approach. The 2nd approach just has too much overhead. If you needed to use that kind of approach, a machine language sort that converts everything to ints/pointers on entry, does the sort, and then converts everything back on exit would probably be needed. The MC-10 completes the full list in around 5:17, more with standard MS BASIC... maybe another minute or more. This does show some criticism of string handling with Atari BASIC is deserved, but it's certainly capable of doing the job. If you had an Atari, had to deal with this much data, didn't know assembly language, and didn't have access to existing tools, you could definitely roll your own software to do the job. It would still be infinitely faster than having to alphabetize a list of names by hand. One of my duties at a job when I was in college, was having the computer sort, and print their mailing list for bulk mailings. The research group I worked for had printed it unsorted once, and the university mail office said never again. Doing it by hand took days if I remember right. If you started a similar program, and left it running, it could probably sort and print such a list in a couple hours. Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 27, 2019 Share Posted July 27, 2019 6 hours ago, flashjazzcat said: Try running the emulator in Warp Speed (or simply holding down the F1 key). Pastes into Altirra BASIC in a minute or less. This worked great, thanks! Quote Link to comment Share on other sites More sharing options...
drpeter Posted July 28, 2019 Share Posted July 28, 2019 (edited) 53 minutes ago, JamesD said: Ditch the busy thing, it just steals too much CPU time on this much data. Well, obviously it's to an extent just eye-candy, but on my benchmarking adds only ~6% to the running time of the sort (49 mins vs 52 mins on Altirra BASIC). I have a built-in antipathy to long routines running silently for more than ~10 seconds at a time with no visual indication that the system hasn't seized. Just my weird preference :-) This little proof of concept shows some of both the strengths and weaknesses of ATARI BASIC string handling. It's a very versatile system, readily repurposed to numerous uses other than plain text string storage using easily intelligible code. I personally prefer the ATARI BASIC character-array-indexing syntax to the ugly (to my mind) LEFT$/MID$/RIGHT$. But these manipulations/abuses of the string handling system are likely to run painfully slowly when applied to large datasets, not helped of course by ATARI BASIC being a very slow implementation in the first place. Other compatible BASICs such as TurboBasic XL etc. take a little bit of the sting out of this. But the idea here in any case was really as an academic exercise to see how your sort routine could be implemented using only the 'out of the box' Atari set-up. Obviously, if one were nowadays to be attempting a task like this seriously, there's no rational reason to use an Atari for it at all. And even if one were to, one would choose a flavour of BASIC more suited to the task, i.e. a faster one with built-in string arrays!! 55 minutes ago, JamesD said: If the data were written to a disk file instead of being read from data statements, you might be able to load the entire list using this approach. Agree fully. Again, in the real world there is no way, even memory issues to one side, that one would implement this with hard-coded DATA statements rather than a separate data file. Edited July 28, 2019 by drpeter 1 Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 28, 2019 Share Posted July 28, 2019 3 hours ago, drpeter said: Other compatible BASICs such as TurboBasic XL etc. take a little bit of the sting out of this. But the idea here in any case was really as an academic exercise to see how your sort routine could be implemented using only the 'out of the box' Atari set-up. I tried to implement the sort to encourage someone more familiar with Atari BASIC to finish the code. I figured the Atari could do it based on the comments, but I wanted to see how difficult it was, and how fast it would run. Congrats, you fell victim to my evil plan! Mu ha ha haaaaa! Well done on implementing it btw. Any reviewer that knocked Atari BASIC for string handling had some justification because it's not as easy. But when they just said it didn't support string arrays... well... technically it's true, but they didn't tell you there were ways to implement it. Atari BASIC may have been the biggest reason the Atari didn't sell better, and the saddest part of that... it was on a freakin cart! How do you mess that up?? Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 28, 2019 Share Posted July 28, 2019 (edited) you can look to these and scroll to the string sections... basic/ml fun https://www.atariarchives.org/mlb/chapter9.php https://www.atarimagazines.com/compute/issue77/High-Speed_String_Sort_For_Atari_BASIC.php https://www.atarimagazines.com/compute/issue11/52_1_STRING_ARRAYS_IN_ATARI_BASIC.php better listings existed back in the day, but these are where it started for most. in any event it's a great starting point, though it looks like some of it's already been covered in the thread... Edited July 28, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 28, 2019 Share Posted July 28, 2019 The 2nd two, depend on fixed length strings, rather than packed strings. You could scan through the names in the data to find the longest name, then use that for the size of the field, but you are looking at reserving at least 11 characters from a glance at the data. The program becomes a little simpler since you don't have to store start & end info for the strings, just multiply the index * the max length to calculate the start, and add the max length to get the end. Given the size of the space reserved for the start & end numbers, it should be able to hold a lot more strings, thought I'm not sure it will do much for speed since you are multiplying. Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 30, 2019 Share Posted July 30, 2019 A slightly fixed, and optimized MS BASIC version of the comb sort with prettier output. The Atari had line length issues with some of the previous code I posted, doesn't like NEXT without a variable, and seems to require THEN GOTO instead of just THEN line#. This should be closer to working from the start. Spoiler 'comb sort. 'p = what we divide the array size by to get the gap 'G = the gap 'using nested for loops avoids having to perform a line search that would 'happen using GOTO. The address is simply pulled off of the stack. 'using STEP 0 keeps FOR NEXT from changing the variable and the endless loop 'exits once the exit condition is achieved 'This revision prevents the 0 gap pass, and duplicate gaps if no swap took place the first time 'It checks the T temp variable used to swap indexes to see if a swap took place ' I don't like the GOTO on line 21, but it's only executed in the final passes if no swaps took place, so it saves more time than it adds. 'We start the array index at 1, so T should never = 0 if a swap takes place. 'Starting the array at 0 could break this code, so keep that in mind when porting it 18 Q=1:F=1.3:P=F:FORG=INT(N/P)TO0STEP0:PRINT"PASS =";Q;"GAP =";G:T=0 19 FORI=1TON-G:IFA$(B(I))>A$(B(I+G))THENT=B(I):B(I)=B(I+G):B(I+G)=T 20 NEXTI:H=P:Q=Q+1 21 P=P*F:G=INT(N/P):IFNOT(T)ANDP=HTHENGOTO21 22 NEXTG:RETURN Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 30, 2019 Share Posted July 30, 2019 (edited) 'and seems to require THEN GOTO instead of just THEN line#' ??? sorry you lost me... what version of Atari Basic are you talking about Atari Basic or Atari MS BASIC 1 or Atari MS BASIC II? plain vanilla Atari BASIC does THEN without GOTO... Edited July 30, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 30, 2019 Share Posted July 30, 2019 (edited) since I only use real hardware, can we have the saved programs on an ATR. Just not keen on typing in the listing to play along, while I will type in revisions or modify, correct errors and play with the listing Edited July 30, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
ivop Posted July 30, 2019 Share Posted July 30, 2019 2 hours ago, _The Doctor__ said: plain vanilla Atari BASIC does THEN without GOTO... Totally off-topic, but your line 20 inspired me to do this: That's just atari800 -basic , so no DOS or anything. 1 Quote Link to comment Share on other sites More sharing options...
toddtmw Posted July 30, 2019 Share Posted July 30, 2019 Stack overflow, i assume? Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 30, 2019 Share Posted July 30, 2019 (edited) Ah, you have come to the inbuilt joke... it prints PEBKAC all over the screen in case something bad happens if it goes there... I don't think it will get to line 20 any time soon yes the problem exists between keyboard and chair will print all over the place... signifying the how crazy it is. Wonder how long till an XE dies doing that the behavior will change by the way, depending on the current conditions and if you use immediate mode or run to kick things off. The jibberish code is there as an example, it runs perfectly fine and serves no purpose other than to show the line (10) applying THEN to send itself back to line 10 using nothing but the line number. No GOTO was needed after THEN. I did type in his lines 18 - 22 and left GOTO out using just then and the line #and it accepted it. fun stuff... last discussion about differing sort types was sometime last year and I think some of us were in that one as well. Edited July 30, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 30, 2019 Share Posted July 30, 2019 (edited) 1 hour ago, ivop said: Totally off-topic, but your line 20 inspired me to do this: That's just atari800 -basic , so no DOS or anything. 0 poke 82,0 10 X=X+1:?;X;" ";:POP:GOSUB 10 depending on RUN, or direct mode goto, and what else is going on you can get errors with your line above. See how far along you get with the lines I just posted in any event... edit* it's still going on my stock 130XE... Edited July 30, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
JamesD Posted July 30, 2019 Share Posted July 30, 2019 (edited) 2 hours ago, _The Doctor__ said: Ah, you have come to the inbuilt joke... it prints PEBKAC all over the screen in case something bad happens if it goes there... I don't think it will get to line 20 any time soon yes the problem exists between keyboard and chair will print all over the place... signifying the how crazy it is. Wonder how long till an XE dies doing that the behavior will change by the way, depending on the current conditions and if you use immediate mode or run to kick things off. The jibberish code is there as an example, it runs perfectly fine and serves no purpose other than to show the line (10) applying THEN to send itself back to line 10 using nothing but the line number. No GOTO was needed after THEN. I did type in his lines 18 - 22 and left GOTO out using just then and the line #and it accepted it. fun stuff... last discussion about differing sort types was sometime last year and I think some of us were in that one as well. I based the comment on drpstr's code. Lot's of changes needed for Atari BASIC so I didn't bother testing... just assumed he knew what he was doing. But then he doesn't care about wasting 6% of the CPU time, which is over half the amount I've managed to speed up the MC-10. :/ Getting it running on the Apple II required changing CLS to HOME, and the Plus/4 required changing CLS to SCNCLR. Pretty trivial changes really. Assuming the emulators are accurate... the II Plus takes about 6:30, and the Plus/4 takes about 8 minutes. The extended RAM support in the Plus/4 has quite a price. But, it would be able to handle the entire list of 1000 names if I tried it. The MC-10 came in a few seconds under 6 minutes for regular BASIC, and around 5:20 for the new version. The C64 emulator I downloaded, VCC (CoCo), and Blue MSX don't have an option for typing in text so I didn't test them. Edited July 30, 2019 by JamesD Quote Link to comment Share on other sites More sharing options...
jnharmon Posted July 30, 2019 Share Posted July 30, 2019 On 7/25/2019 at 2:53 PM, drpeter said: IIRC Atari BASIC doesn't have string arrays, so you needed to implement them 'by hand' by using an index into a single very long string. e.g. instead of DIM A$(10) to dimension an array of e.g. 10 x 256 character strings, you would DIM A$(2560) and reference the array as substrings: A$(0) (MS BASIC) being then sort of equivalent to A$(1,256) (ATARI BASIC) A$(X) (MS BASIC) being sort of equivalent to A$(X*256+1,(X+1)*256) You would also need to dimension a separate numeric array e.g. DIM A(10) to hold the lengths of the substrings if that were important: Assuming that the maximum length required for a substring is MAXLEN and the required size of the array is SIZE: after DIM A$(SIZE*MAXLEN) DIM A(SIZE) A$(X) will then be given by A$(X*MAXLEN+1,X*MAXLEN+A(X)) ATARI BASIC suffered from lack of an INSTR function, which required either a very slow BASIC search routine or a USR function. LEFT$(A$,X) is given by A$(1,X) MID$ (A$,Y,X) is given by A$(Y,Y+X-1) RIGHT$ (A$,X) is given by A$(LEN(A$)-X+1,LEN(A$)) WRT writing adventure games in ATARI BASIC , I ported the first ever published source for a BASIC adventure game, 'Dog Star Adventure', from TRS-80 BASIC (which had string arrays) to ATARI BASIC back in 1982, when the source was published in Computer & Video Games magazine. So yes, it's definitely possible! I used a slightly different technique for storing the lengths of the substrings. Instead of storing a separate array of the lengths, I prefixed each substring with a byte containing the length of the substring (this works as long as you limit substring length to less than 256 bytes). To find the length of the substring, you just look at the value of the first byte at it's starting location. The actual substring starts on the byte after that. This reduces the storage for the length from 6 bytes per substring down to 1 byte. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.