source: release/1.6/source/cocoa-ide/hemlock/unused/archive/spell/hashing.lisp

Last change on this file was 6, checked in by Gary Byers, 21 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 538 bytes
Line 
1(in-package "SPELL")
2
3;;; FIXME: the original code included the below comment; obviously, it
4;;; utilized implementation-specific primitives to speed up hashing. is
5;;; this reasonable to do?
6;;;
7;;; STRING-HASH employs the instruction SXHASH-SIMPLE-SUBSTRING which takes
8;;; an end argument, so we do not have to use SXHASH. SXHASH would mean
9;;; doing a SUBSEQ of entry.
10(declaim (inline string-hash))
11(defun string-hash (string length)
12 (if (= length (length string))
13 (sxhash string)
14 (sxhash (subseq string 0 length))))
Note: See TracBrowser for help on using the repository browser.