lispdoc - results for create-optimized-test-function

(cl-ppcre:create-optimized-test-function test-function &key (start 0)
 (end *regex-char-code-limit*) (kind *optimize-char-classes*))
Function: Given a unary test function which is applicable to characters returns a function which yields the same boolean results for all characters with character codes from START to (excluding) END. If KIND is NIL, TEST-FUNCTION will simply be returned. Otherwise, KIND should be one of: * :HASH-TABLE - builds a hash table representing all characters which satisfy the test and returns a closure which checks if a character is in that hash table * :CHARSET - instead of a hash table uses a "charset" which is a data structure using non-linear hashing and optimized to represent (sparse) sets of characters in a fast and space-efficient way (contributed by Nikodemus Siivola) * :CHARMAP - instead of a hash table uses a bit vector to represent the set of characters You can also use :HASH-TABLE* or :CHARSET* which are like :HASH-TABLE and :CHARSET but use the complement of the set if the set contains more than half of all characters between START and END. This saves space but needs an additional pass across all characters to create the data structure. There is no corresponding :CHARMAP* kind as the bit vectors are already created to cover the smallest possible interval which contains either the set or its complement.