Shirakumo / radiance

A Common Lisp web application environment
https://shirakumo.github.io/radiance/
zlib License
311 stars 19 forks source link

Compiler optimisation notes when starting radiance #18

Closed Davidbhodge closed 6 years ago

Davidbhodge commented 6 years ago

SBCL 1.3.20

For your information when loading radiance I get the following notes

; file: /Users/dbh/quicklisp/dists/shirakumo/software/radiance-2017.10.01_07-22-48-GMT/uri.lisp ; in: DEFUN URI-MATCHES ; (LENGTH (RADIANCE-CORE:DOMAINS RADIANCE-CORE::PATTERN-URI)) ; ; note: unable to optimize due to type uncertainty: The first argument is a SEQUENCE, not a (SIMPLE-ARRAY ()). ; ; note: unable to optimize due to type uncertainty: The first argument is a SEQUENCE, not a VECTOR.

; (LENGTH (RADIANCE-CORE:DOMAINS RADIANCE-CORE:URI)) ; ; note: unable to optimize due to type uncertainty: The first argument is a SEQUENCE, not a (SIMPLE-ARRAY ()). ; ; note: unable to optimize due to type uncertainty: The first argument is a SEQUENCE, not a VECTOR.

; file: /Users/dbh/quicklisp/dists/shirakumo/software/radiance-2017.10.01_07-22-48-GMT/dispatch.lisp ; in: DEFUN DISPATCH ; (LOOP RADIANCE-CORE::FOR RADIANCE-CORE::DISPATCHER RADIANCE-CORE::ACROSS RADIANCE-CORE::URI-PRIORITY ; WHEN (RADIANCE-CORE:URI-MATCHES RADIANCE-CORE:URI ; RADIANCE-CORE::DISPATCHER) ; DO (WITH-SIMPLE-RESTART ; (RADIANCE-CORE:ABORT-HANDLING ; "Abort the current handler and continue dispatching.") ; (RETURN ; (FUNCALL ; (RADIANCE-CORE:DISPATCH-FUNCTION RADIANCE-CORE::DISPATCHER)))) ; RADIANCE-CORE::FINALLY (RETURN (FUNCALL RADIANCE-CORE::URI-FALLBACK))) ; --> BLOCK LET TAGBODY SB-LOOP::LOOP-REALLY-DESETQ SETQ THE AREF ; ==> ; (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX) ; ; note: unable to optimize because: Upgraded element type of array is not known at compile time.

; file: /Users/dbh/quicklisp/dists/shirakumo/software/radiance-2017.10.01_07-22-48-GMT/handle.lisp ; in: DEFUN ENSURE-REQUEST-HASH-TABLE ; (STRING RADIANCE-CORE::K) ; ; note: unable to optimize due to type uncertainty: The first argument is a (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL CHARACTER), not a SYMBOL. ; ; note: unable to optimize due to type uncertainty: The first argument is a (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL CHARACTER), not a STRING. ; ; compilation unit finished ; printed 7 notes

Shinmera commented 6 years ago

They're just optimisation notes.

Davidbhodge commented 6 years ago

indeed - one might consider some declares?

Shinmera commented 6 years ago

(Micro) optimisation in general is not something I've paid much mind to yet, so I don't see much point in quieting these notes unless there's going to be a general optimisation-focused reworking.