freenode/#sbcl - IRC Chatlog
Search
19:31:07
Kabriel
I am trying to use alexandria:median in a function, and when I compile the function, SBCL issues a warning:
19:32:25
pfdietz
Just that the code is slower than it would be if the optimization could be performed.
19:32:30
pkhuong
it means the optimiser was unable to show it was safe to allocate some function on the stack, and will instead use heap allocation
19:34:24
pkhuong
it's hard to do escape analysis on opaque functions that may be redefined at any moment
19:35:18
Kabriel
Is there a reason this note is issued when I try to compile in side of an inferior lisp running through slime, vs a fresh startup of sbcl?
19:38:15
Bike
having a specializer counts as a use but without a specializer the compiler is allowed to issue a warning. this is specifically mentioned on the defmethod page for some reason.
19:38:44
pkhuong
Kabriel: directly using the inferior lisp buffer is a strange workflow. #lisp can help you with that
19:40:19
Kabriel
pkhuong: I'm mis-speaking. I am using emacs/slime. It complains if I compile in that workflow (i.e. C-c C-c), but not if I start sbcl from the command line and (compile my-function)
19:41:02
Bike
if filtered-functions defines its own make-method-lambda that would change the behavior, i guess.
19:42:12
phoe
https://github.com/pcostanza/filtered-functions/blob/master/filtered-functions.lisp#L218
19:42:56
pkhuong
Kabriel: like I said, the bare REPL silences some notes for interactive evaluation. C-c C-c is an explicit compilation, which is expected to be noisier.
19:44:15
Bike
oh, it's costanza. well then he's probably defining enough that this gets lost somewhere
19:46:25
pkhuong
Kabriel: also, DEFUN already installs a compiled function in the default configuration, so COMPILE is a no-op
19:59:07
phoe
like, frame 22: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LIST (DEFMETHOD FROB (BAR))) #<NULL-LEXENV>)
20:02:30
pkhuong
pfdietz: have you seen https://havrikov.github.io/publications/ase19-preprint.pdf ?
20:04:46
pfdietz
Bike: I had missed that part of the spec (about specializers suppressing warnings). This is immediately useful for me -- thanks!
20:13:05
phoe
if it doesn't skip it, shouldn't the generated FLET have IGNORABLE for all lambda parameters?
20:14:43
phoe
https://github.com/pcostanza/closer-mop/blob/b18d6fb33b2fc3b41ad51b2ab3fbb6dbcf83d120/closer-mop-shared.lisp#L162