freenode/#lisp - IRC Chatlog
Search
9:50:36
pve
Hi! If I have a generic function "whitespacep" and compare it with another, "make-whitespace-predicate", which returns a function that recognizes whitespace, I get these results:
9:53:25
no-defun-allowed
whitespacep would perform method dispatch every time it is called, whereas make-whitespace-predicate only performs dispatch once. For such a small function, the runtime of method dispatch might be comparable to the runtime of your method.
9:55:13
no-defun-allowed
beach: Are you sure? I'm reading the opposite: test-1 invokes a generic function and takes 1.5 seconds, and test-2 does not and takes 0.6 seconds.
9:55:43
aeth
Hmm... Not noticably, though. (time (test-1)) (time (test-1)) has the second one faster, but not by much.
9:56:45
no-defun-allowed
No stress - it's Friday (evening after an electrical engineering exam here).
10:07:47
pve
is there a way to tell the compiler "I think I know what I'm doing, use only this whitespacep method and skip the dispatch"?
10:09:16
flip214
GET compares the INDICATOR via EQL, and that can't be changed, right? So if I did (SETF (GET 'sym '(text :de)) "foo") I can't use GET to retrieve but have to use SYMBOL-PLIST?!
10:10:21
flip214
or mark the function as INLINE and have a TYPECASE in there (with identical code, perhaps) - some past ELS used that to have the "right" optimized version for each usage
13:10:58
Xach
here's an odd scam: https://www.ebay.com/itm/402385613081 - a blank notebook "customized for common lisp programmers"
13:15:40
_death
I'm reading an interesting book nowadays, though it's about a system that was written in Interlisp..
13:33:20
dbotton_
is there a simple tutorial or template with good comments on the ideal way today to setup a lisp project, configs etc
14:06:18
adlai
Xach: I am drafting a reasonably-concise and hopefully-polite literal copy of my explanation from yesterday, to place in the github issue; in case it was not clear, there is a reasonable chance that I will nix the licensing question and close the issue myself, without requiring further action from you.