freenode/#sbcl - IRC Chatlog
Search
2:53:04
|3b|
hmm, with SPEED 3, FILL on a (simple-array ub32 1) with ub32 fill value notes about boxing the value passed to ub32-bash-fill
2:57:17
|3b|
ACTION wonders how many elements it takes for writing 2 words at a time to outweigh that
3:43:41
|3b|
what does "note: couldn't inline expand because expansion calls this LET-converted local function:" mean?
4:27:20
|3b|
still messy, but compiles without other code https://gist.github.com/3b/0de02be5a32ccdf0d4cc0eacaa420a3c
4:35:39
|3b|
even simpler version https://gist.github.com/3b/0de02be5a32ccdf0d4cc0eacaa420a3c#gistcomment-3175366
6:14:21
|3b|
with them inlined, it splits the termination test and the body of the loop into opposite ends of the functions, which seems to be slightly slower
6:17:27
|3b|
and (labels ((foo ...)) (bar #'foo)) is faster than (bar (lambda ...)), with FOO and BAR inlined
6:53:14
|3b|
ACTION isn't sure if it is reasonable for (defmacro ilambda (a &body b) `(flet ((x ,a ,@b)) (declare (inline x)) #'x)) to be faster than lambda or not
6:54:27
|3b|
it is, but trying to figure out spec implications of returning an inlined function (and it actually being inlined) makes my brain hurt
7:39:47
karlosz
if you have rle-component in your code have (funcall f ...) only once by perhaps reduplicating some conditionals, you will get much much better code
7:40:49
karlosz
you can get rid of every INLINE declaration and Python will be able to integrate (i.e. let convert) all the local functions into the main function
7:41:37
|3b|
in the real code i had 4 calls to rle-component with different functions, would it still integrate them in that case?
7:53:40
|3b|
fastest is manually inlining the called functions into copies of rle-component, then declaring the copies notinline
7:55:41
|3b|
i think part of the problem is that whichever way it gets inlined (either explicit declaration, or let conversion), the loops get spread out too much
7:56:55
|3b|
i'm about done with code for today, but will try to put the code up somewhere people can see it tomorrow if you want to look at it directly to see what it's doing
14:00:48
jdz
I'm still looking into this, but in the meanwhile maybe stassats knows what's up: https://gist.github.com/jdz/13c002e186f2e7f45f3912eb007c65b2
14:03:03
jdz
CL-WHO does a bit of rebinding, like (let ((stream stream)) ...), but looking at WITH-HTML-OUTPUT macro (and the MACROLETs) I don't immediately see how to reduce the test case.
14:41:01
jdz
Interestingly, removing (check-type ,var stream) from WITH-HTML-OUTPUT macro seems to fix this.