freenode/#sbcl - IRC Chatlog
Search
10:24:33
flip214
How about PARSE-INTEGER only reporting the substring, or showing start and end in the error message?
13:58:25
pfdietz
Calling find-symbol, and then calling intern only when the symbol does not exist, is slightly faster than just calling intern (in the case where the symbol already exists). I wonder how often intern creates a symbol. Probably not too often.
14:06:43
pfdietz
Yes. Also, it's not clear to me that the package lookup optimization for INTERN is happening with FIND-SYMBOL. Tests done with explicit package object arguments.
14:10:25
stassats
i don't believe that to be true, find-symbol being faster than intern, but without actually measuring it
14:15:46
stassats
other than some additional function call overhead, intern calling find-symbol vs directly calling find-symbol
14:18:54
stassats
function call overhead is measurable, but it's insignificant when taking the amount of iterations needed to measure it
14:30:09
stassats
hmm, i see an instances where sb-ext:*derive-function-types* is not taken into account when compiling sbcl itself
15:03:44
stassats
i reduced some type-checking and multiple-value-returning overhead, and now it's just a single function call overhead
17:02:03
pfdietz
I wonder if it makes sense to convert the name to a simple-base-string, when possible.
17:03:13
pfdietz
when creating the symbol, that is, not when looking up the string to see if the symbol already exists.
17:13:03
Bike
there's a test in babel that that breaks, because it does something like (setf (char (copy-seq "???") 0) (code-char big-number))
17:20:59
pfdietz
"The accumulated characters up to but not including the matching double-quote are made into a simple string and returned."
17:22:50
pfdietz
That's right. A simple-string is a union of various simple array types; the element type just has to be a subtype of character.
17:27:12
pfdietz
"A simple string is a specialized one-dimensional simple array whose elements are of type character or a subtype of type character."
17:34:59
Bike
right, it's indirect. substitute. https://github.com/cl-babel/babel/blob/master/tests/tests.lisp#L482-L488
18:42:41
pfdietz
SBCL already has the mechanism for turning strings into base-strings when reading (when possible.). readtable-base-char-preference in src/code/reader.lisp