Re: $100 Contest Question
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 03, 2002
- 469 views
Ray Smith writes: > OK, I see your point. (my weekend wasn't wasted .. phew!) > > Can this be clarified by Rob as it wasn't to clear me (and probably > others) when I read the previous thread. I think Derek summed it up correctly already, but I'll try again. In problem #2, I want everyone to start by reading the same set of words (Junko's), formatted the same way on disk. Certainly, if everyone used a different set of words I'd have a hard time verifying correctness, and a hard time comparing performance. In problem #3 it doesn't matter. You can use whatever dictionary file you like, formatted however you like. If you don't use Junko's you'll have to send me your dictionary file. In both #2 and #3 I'm imagining that people will load the words into memory (i.e. a sequence of some kind, although poking the data into allocated memory would be legal), so they can make many dictionary queries at high speed. I have a 64 Mb RAM machine (as I've noted now on the Web page), so there shouldn't be any problem keeping the whole 51802-word dictionary in memory. Writing it out to disk in some optimized format is legal, but unlikely to be as fast as accessing the words in memory. In #2 you will first load the words into memory, maybe with top-level code in your include file, or with an init() routine that you call, or maybe your pattern matching routine will do it on the first call (only) to that routine. Derek Parnell writes: > For the first ever run of the program I used words.txt file, > reformatted it and wrote out another file. In second and > subsequent uses of the program, I used my reformatted file. > But apparently this is no longer allowed. I still haven't had an > official ruling on this case, but I'm going to assume that > I have to change the way I did the program. This is interesting, but for this competition it won't be useful because I want to time one run of each program, starting from scratch with Junko's file. The time will include the word loading time plus the time to perform 1000 pattern matching calls. (In reality, I'll probably run programs more than once to get a consistent time based on everything being in the operating system cache, but I don't want programs to take advantage of anything they did in a previous run.) Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com