HatTrie
HatTrie copied to clipboard
Couple of minor issues when compiling with GCC when all warnings and M64
- Add void type to - void vecswap (int i, int j, int n, HatSort *x)
- The QueryProcessCycleTime did not exist on my gcc running from cygwin so I added the logic to check for QueryProcessCycleTime and fall back to clock() if it was not set. Had to change for both startcycles and stopcycles.
#if !defined(_WIN32)
gettimeofday(&stop, NULL);
search_real_time = 1000.0 * ( stop.tv_sec - start.tv_sec ) + 0.001
* (stop.tv_usec - start.tv_usec );
search_real_time = search_real_time/1000.0;
stopcycles = rd_clock();
#else
#ifdef QueryProcessCycleTime
QueryProcessCycleTime(GetCurrentProcess(), &stopcycles);
#else
stopcycles = clock();
#endif
*stop = clock ();
search_real_time = (*stop - *start) / (float)CLOCKS_PER_SEC;
#endif
- Created a distinct1.txt file containing a few thousand words
- Modify command to start distinct1.txt instead of the other file.
- The file http://www.naskitis.com/distinct_1.bz2 for the distinct words comes up with a not authorized for that file error message. A acceptable alternative can be downloaded from https://raw.githubusercontent.com/dominictarr/random-name/master/first-names.txt It comes in sorted order so used the rev distinct1.txt > distinct2.txt to convert it to reversed order.
With these changes the test ran up to the point where it printed out the list of input words and then just quit.
A larger file containing all words in the english language is available at http://www-personal.umich.edu/~jlawler/wordlist but the sample quite with a error when trying to process this file.
Do not have time to hack on it more since the judy array and khash are working. May come back to it and finish in the future.