(define (string->uninterned-symbol string)
(make-uninterned-symbol (if (string? string)
- (string->utf8-string string)
+ (or (ascii-string-copy string)
+ (string->utf8-string string))
(wide-string->utf8-string string))))
(define (utf8-string->uninterned-symbol string)
(define (string->symbol string)
((ucode-primitive string->symbol) (if (string? string)
- (string->utf8-string string)
+ (or (ascii-string-copy string)
+ (string->utf8-string string))
(wide-string->utf8-string string))))
(define (utf8-string->symbol string)
(utf8-string->wide-string (symbol-name symbol)))
(define (symbol->string symbol)
- (utf8-string->string (symbol-name symbol)))
\ No newline at end of file
+ ;; `Gensyms' are constructed with this, so try the fast copy first.
+ (or (ascii-string-copy (symbol-name symbol))
+ (utf8-string->string (symbol-name symbol))))
\ No newline at end of file