📄 changelog
字号:
The Ullman array was used to remove the need to reinitialize all the Bool_Array elements to zero everytime we needed to determine whether there were duplicate hash values in the keyword list. The current trick uses an `iteration number' scheme, which takes about 1/3 the space and reduces the overall program running a time by about 20 percent for large input! The hack works as follows: 1. Dynamically allocation 1 boolean array of size k. 2. Initialize the boolean array to zeros, and consider the first iteration to be iteration 1. 2. Then on all subsequent iterations we `reset' the bool array by kicking the iteration count by 1. 3. When it comes time to check whether a hash value is currently in the boolean array we simply check its index location. If the value stored there is *not* equal to the current iteration number then the item is clearly *not* in the set. In that case we assign the iteration number to that array's index location for future reference. Otherwise, if the item at the index location *is* equal to the iteration number we've found a duplicate. No muss, no fuss! Mon Oct 2 12:30:54 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Changed some consts in options.h to enumerals, since g++ doesn't seem to like them at the moment!Sat Sep 30 12:55:24 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Fixed a stupid bug in Key_List::print_hash_function that manifested itself if the `-k$' option was given (i.e., only use the key[length] character in the hash function). * Added support for the -C option. This makes the contents of all generated tables `readonly'. * Changed the handling of generated switches so that there is only one call to str[n]?cmp. This *greatly* reduces the size of the generated assembly code on all compilers I've seen. * Fixed a subtle bug that occurred when the -l and -S option was given. Code produced looked something like: if (len != key_len || !strcmp (s1, resword->name)) return resword; which doesn't make any sense. Clearly, this should be: if (len == key_len && !strcmp (s1, resword->name)) return resword;Tue Sep 26 10:36:50 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Changed class Read_Line's definition so that it no longer needs to know about the buffering scheme used to speed up dynamic memory allocation of input keywords and their associated attributes. This means that operator new is no longer a friend of Read_Line.Mon Sep 25 23:17:10 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) * Decided that Obstacks had too much overhead, so they were removed in favor of super-efficient, low-overhead buffered storage allocation hacks in Read_Line and List_Node. * No longer try to inline functions that g++ complains about (Key_List::Merge and Key_List::Merge_Sort).Sun Sep 24 13:11:24 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Changed classes Read_Line and List_Node to use Obstacks in order to cache memory allocation for keyword strings and List_Nodes. * Continued to experiment with inheritance schemes. * Added a new file `alpha.h', that declares static data shared (i.e., inherited) between classes List_Node and Key_List.Tue Sep 12 16:14:41 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Made numerous changes to incorporate multiple inheritance in gperf.Wed Aug 16 23:04:08 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Added the -DCOMPILER_FIXED flag to the ./src/Makefile. This implies that people trying to compile gperf need to have a working version of the new g++ compiler (1.36.0). * Removed some extra spaces that were being added in the generated C code.Mon Jul 24 17:09:46 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Fixed PRINT_HASH_FUNCTION and PRINT_LOOKUP_FUNCTION in keylist.c so that the generated functions take an unsigned int length argument. If -a is enabled the prototype is (const char *str, size_t len).Fri Jul 21 13:06:15 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) * Fixed a typo in PRINT_KEYWORD_TABLE in keylist.cc that prevented the indentation from working correctly. * Fixed a horrible typo in PRINT_KEYWORD_TABLE in keylist.cc that prevented links from being printed correctly.Tue Jul 18 16:04:31 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) * Fixed up readline.cc and readline.h so that they work OK with g++ compilers that aren't completely up-to-date. If symbol COMPILER_FIXED is defined then the behavior that works on my more recent version of g++ is enabled.Sun Jul 9 17:53:28 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Changed the ./tests subdirectory Makefile so that it uses $(CC) instead of gcc.Sun Jul 2 21:52:15 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Fixed a number of subtle bugs that occurred when -S was combined with various and sundry options. * Added the -G option, that makes the generated keyword table a global static variable, rather than hiding it inside the lookup function. This allows other functions to directly access the contents in this table. * Added the "#" feature, that allows comments inside the keyword list from the input file. Comment handling takes place in readline.c. This simplifies the code and reduces the number of malloc calls. * Also added the -H option (user can give the name of the hash function) and the -T option (prevents the transfer of the type decl to the output file, which is useful if the type is already defined elsewhere).Thu Jun 22 20:39:39 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Modified many classes so that they would inherit Std_Err as a base class. This makes things more abstract...Fri Jun 16 14:23:00 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) * Modified the -f (FAST) option. This now takes an argument. The argument corresponds to the number of iterations used to resolve collisions. -f 0 uses the length of the keyword list (which is what -f did before). This makes life much easier when dealing with large keyword files.Tue Jun 6 17:53:27 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Added the -c (comparison) option. Enabling this will use the strncmp function for string comparisons. The default is to use strcmp. * Fixed a typo in key_list.cc (PRINT_SWITCH). This caused faulty C code to be generated when the -D, -p, and -t options were all enabled.Thu May 25 14:07:21 1989 Doug Schmidt (schmidt at siam.ics.uci.edu) * Once again, changed class Read_Line to overload global operator new. Hopefully, this will work...!Sun May 21 01:51:45 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) * Modified Key_List::print_hash_function () so that it properly formats the associated values in the hash table according to the maximum number of digits required to represent the largest value. * Removed the named return value from class Hash_Table's operator (), since this causes a seg fault when -O is enabled. No sense tripping subtle g++ bugs if we don't have to.... ;-) * Removed the operator new hack from Read_Line, since this seemed to create horrible bus error problems. * Changed many class member functions and data members to be `static', if they don't manipulate this! Fri May 12 23:06:56 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Changed class Std_Err to use static member functions, a la Ada or Modula 2. This eliminates the need for an explicit error-handler class object. * Added the ``named return value'' feature to Hash_Table::operator () and Bool_Array::operator [], just for the heck of it.... ;-) * Changed the previous hack in Read_Line so that we now use the overloaded global `new' instead of NEW_STRING!Wed May 3 17:36:55 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) * Updated to version 1.7. This reflects the recent major changes and the new C port. * Modified the GNU getopt.cc routine to have a class-based interface. * Fixed a typo in Perfect.cc ~Perfect that prevented the actual maximum hash table size from being printed (maybe the stream classes weren't so bad after all.... ;-). * Added support for the -f option. This generates the perfect hash function ``fast.'' It reduces the execution time of gperf, at the cost of minimizing the range of hash values.Tue May 2 16:23:29 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) * Added an efficiency hack to Read_Line. Instead of making a call to operator NEW (a.k.a. malloc) for each input string a new member function NEW_STRING stores a large buffer from which new strings are carved out, growing the buffer if necessary. It might be useful to add this throughout the program.... * Removed all unnecessary calls to DELETE. If the program is about to exit it is silly to waste time freeing memory. * Added the GNU getopt program to the distribution. This makes GPERF portable to systems that don't include getopt in libc. * Added a strcspn member to class Key_List. This also increases portability. * Added the get_include_src function from keylist.c as a member function in class Key_List. Hopefully every function is now associated with a class. This aids abstraction and modularity. * Ported gperf to C. From now on both K&R C and GNU G++ versions will be supported. There will be two ChangeLog files, one for each version of the program.Mon May 1 16:41:45 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Fixed a bug with -k'*'. This now prints out *all* the cases up to the length of the longest word in the keyword set.Sun Apr 30 12:15:25 1989 Doug Schmidt (schmidt at crimee.ics.uci.edu) * Removed all use of the stream classes. Too ugly, slow, and not handled by the c++-mode formatter.... * Modified the handling of links (i.e., keywords that have identical hash values as other keywords). This should speed up hash function generation for keyword sets with many duplicate entries. The trick is to treat duplicate values as equivalence classes, so that each set of duplicate values is represented only once in the main list processing. * Fixed some capitialization typos and indentations mistakes in Key_List::print_hash_function.Sat Apr 29 12:04:03 1989 Doug Schmidt (schmidt at zola.ics.uci.edu) * Fixed a typo/logico in Key_List::print_switch that prevented the last keyword in the keyword list to be print out. This requires further examination..... * Fixed a stupid bug in List_Node::List_node. If the -k'*' option was enabled the KEY_SET string wasn't getting terminated with '\0'!Fri Apr 28 12:38:35 1989 Doug Schmidt (schmidt at glacier.ics.uci.edu) * Renamed strexp.h and strexp.cc to iterator.h and iterator.cc. Also changed the strexp class to iterator. Continued to work on style... * Updated the version number to 1.6. This reflects all the recent changes.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -