Interning symbols can be costly #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Users should be discouraged from creating intermediate symbol values.
In a multi-threaded implementation with a global symbol table, interning symbols will most likely have a locking overhead.
String operations can be implemented much cheaper. Only string comparison (in case of equality) is costly (when compared to symbols).
Hello Marc. Thank you very much for joining up!
Good point. Draft 1 has only these two procedures that return symbols:
and these encourage users to batch up many intermediate operations into a single procedure call.
symbol-append
concatenates any number of strings, and things that are converted into strings, and only makes one symbol at the very end.symbol-transform
callsstring-proc
which does an arbitrarily complex operation on a string.In general, making new symbols is useful in macros and specialized kinds of I/O, which tend not to be performance sensitive.