Custom Query (1030 matches)
Results (394 - 396 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #735 | fixed | LOGNOR: invalid results with type declarations | ||
| Description |
? (lisp-implementation-version)
"Version 1.6-dev-r14231M (LinuxX8632)"
? (defun diff (x)
(- (locally
(declare (type (integer 1000000000 2000000000) x))
(lognor -10 x))
(lognor -10 x)))
DIFF
? (diff 20)
-4294967296
|
|||
| #1099 | fixed | LOOP named NIL does not establish a BLOCK | ||
| Description |
|
|||
| #1269 | fixed | Lambdas don't optimize | ||
| Description |
Optimization works on defun forms like the following: (defun fptest1 (a b)
(declare (optimize (speed 3) (safety 1) (debug 1))
(single-float a b))
(+ a b))
(disassemble 'fptest1)
We can see from the disassembly that it's using the addss* instruction and not calling .SPBUILTIN-PLUS, so we know the optimization is happening. [*addss is X86. The ARM equivalent is fadds.] But lambda forms like the following don't optimize in CCL: (defun fptest8 ()
(declare (optimize (speed 3) (safety 0) (debug 0)))
(lambda (a b)
(declare (optimize (speed 3) (safety 0) (debug 0))
(single-float a b))
(+ a b)))
(disassemble (fptest8))
Because the disassembly contains the telltale line (jmpq (@ .SPBUILTIN-PLUS)), we know that optimization isn't happening. However, the following works: (defparameter fptest14
(lambda (a b)
(declare (optimize (speed 3) (safety 1) (debug 1))
(single-float a b))
(+ a b)))
(disassemble fptest14)
As you can see, the resulting disassembly has no call to .SPBUILTIN-PLUS but rather it calls (addss (% fp1) (% fp0)), indicating optimization is happening. So using a global variable rather than a defun seems to be a partial workaround for anonymous functions, but not closures. |
|||
