Custom Query (1030 matches)
Results (634 - 636 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1338 | fixed | Last could be faster | ||
| Description |
cl:last could be faster by implementing some special cases and open coding the general case. I looked at the sbcl source for LAST, and we may have both guessed at least partly right. As i understand the code, they special-case both the case where N=0 and the one where N=1, and a simpler iterative loop in each of those cases, and a more generaj iterative loop for other values of N. In addition. a compiler-macro is defined on LAST, which may expand into one of the simpler loops if N is constant and does not call out-of-line code in any event . |
|||
| #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. |
|||
| #1099 | fixed | LOOP named NIL does not establish a BLOCK | ||
| Description |
|
|||
