freenode/#sbcl - IRC Chatlog
Search
13:13:09
scymtym
i have a design decision to make regarding a new macro for test-utils: (checked-compile-and-assert (&rest CHECKED-COMPILE-KEYWORDS &key optimize) FORM (ARGS1 VALUES1) (ARGS2 VALUES2) …). now, OPTIMIZE is a specification of optimization settings to map over, compiling and asserting for each one. what should the default behavior be if OPTIMIZE is not supplied?
13:16:12
scymtym
stassats: experimenting with the above, i noticed that compiler-2.pure.lisp / :shift-right-transform-nil-type basically does (assert (= (funcall …))). shouldn't this assert a particular return value instead?
13:18:47
scymtym
do you have an opinion regarding default behavior w.r.t. potentially mapping over multiple optimization settings?
13:25:13
stassats
but we're not checking for assert-error here, so (safety 0) shouldn't change the result
13:28:07
scymtym
yes, this is intended for cases in which the compiled function can be called and the return value checked
13:49:39
scymtym
i put arguments and values on separate lines because i thought that would be easier to parse. did the same for optimizations, but i guess it's not necessary in that case
14:50:02
stassats
testing CMOV conversion on arm64, if the branch is taken it's slower, if the branch is not taken CSEL is faster
14:51:01
stassats
CSEL performance is the same independent of the test result, but branching is sometimes slower, sometimes faster
15:09:24
stassats
saved the changes, not committing, since i'll also have to optimize branch-if-zero/non-zero due to the changes required to IF-EQ
15:43:47
scymtym
huh, #<SB-C:TN-REF :TN #<SB-C:TN t1 :UNUSED> :WRITE-P T :VOP SB-C:CALL-NAMED> not found in reads/writes for its TN
15:54:04
scymtym
stassats: replace test file with https://techfak.de/~jmoringe/dynamic-extent.impure-with-error.lisp and run only that test
16:17:33
scymtym
i'm almost done with CHECKED-COMPILE-AND-ASSERT (but it took longer than i wanted it to, of course)
16:49:11
stassats
sounds like you're calling it with (((SPEED 0) (SAFETY 3) (DEBUG 0) (COMPILATION-SPEED 1) (SPACE 1)))
16:50:20
stassats
Calling (LAMBDA (&REST ARGS) (ELT ARGS 10)) compiled with (SPEED 0) (SAFETY 3) (DEBUG 0) (COMPILATION-SPEED 1) (SPACE 1)
16:51:29
scymtym
basically (funcall (compile nil '(LAMBDA (&REST ARGS) (declare (optimize (SPEED 0) (SAFETY 3) (DEBUG 0) (COMPILATION-SPEED 1) (SPACE 1))) (ELT ARGS 10))))
16:55:57
scymtym
i feared to many parens and unclear boundaries between form, policy, arguments and values otherwise