This is much faster than string comparison, which matters since symbols should
be fast. The downside is that symbols and strings will sort somewhat
differently, but that shouldn't matter since someone can always sort them using
symbol->string.
(string-hash (symbol->string symbol) modulus))
(define (symbol<? x y)
- (let ((sx (symbol->string x))
- (sy (symbol->string y)))
- (or (string<? sx sy)
- (and (string=? sx sy)
- (interned-symbol? sx)
- (uninterned-symbol? sy)))))
+ (bytevector<? (->bytes (system-pair-car x))
+ (->bytes (system-pair-car y))))
(define (symbol>? x y)
(symbol<? y x))