wanted: document %SAP-ALIEN runtime allocation compiler notes

Bug #495044 reported by Tobias C. Rittweiler
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Wishlist
Unassigned

Bug Description

(defun open-directory-1 (directory)
  (declare (optimize (speed 0)))
  (sb-posix:opendir directory)) ; => NO note

(defun open-directory-2 (directory)
  (declare (optimize (speed 1)))
  (sb-posix:opendir directory)) ; => note

I found it a tad bit surprising to see that note being emitted even for
normal SPEED settings.

However the DEFTRANSFORM for %SAP-ALIEN in src/compiler/aliencomp.lisp
specifies :IMPORTANT T -- so I guess this is done on purpose.

So this probably is not a bug, but I'd hope that someone adds an explanation
in a comment, and mark this report as "Invalid" -- so we can later point other
people to it.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote : Re: [Bug 495044] [NEW] "could not optimize away %SAP-ALIEN: forced to do runtime allocation" note even with (SPEED 1)

 status confirmed
 tag alien compiler documentation
 importance wishlist
 summary "wanted: document %SAP-ALIEN runtime allocation compiler notes"

:IMPORTANT transforms complain if they cannot be applied unless SPEED is 0.

This particular ones is :IMPORTANT because if it fails alien code
becomes approximately 100 times slower. Not just "you don't get
optimum performance", but _really_ slow compared to what one would
normally expect.

Instead of pointing people at replies like this we should rather
update documentation -- including how to fix these notes when they
slow your code down to crawl.

summary: - "could not optimize away %SAP-ALIEN: forced to do runtime allocation"
- note even with (SPEED 1)
+ wanted: document %SAP-ALIEN runtime allocation compiler notes
Changed in sbcl:
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.