freenode/#sbcl - IRC Chatlog
Search
14:18:39
borodust
if my lisp image conses too many SAPs (by looking at #'room), what for I should look first? Too much FFI?
14:30:29
scymtym
is the problem the memory lost to SAPs that are retained although they should be garbage or is the problem the CPU time for allocating and collecting the SAPs
15:58:36
borodust
scymtym: it's not the problem per se, cuz they are properly deallocated during garbage collection
16:02:28
scymtym
borodust: i see. i have no good advice then. maybe compile with SPEED 3 and look for SAP boxing notes (I think they say "doing SAP to pointer conversion")
17:18:12
mrcode_
is there a way to make an array of uint8 with sbcl and get an address of an underlying storage or is this something best done with aliens ?
18:17:15
saturn2
mrcode_: i believe you can use sb-sys:vector-sap to get a pointer to the underlying storage
18:34:36
mrcode_
saturn2: cool. thx a lot ! i'm exploring the feasibility of avoiding conversions from aliens to vectors given that they mostly feel like no-ops despite of doing work
19:44:33
|3b|
depends on context, pin + vector-sap might be better for optimizing cases where you don't create the vectors
19:46:20
|3b|
or if you don't care about portability and have long-lived vectors. static-vectors has some annoying limitations due to portability, so you need to explicitly free them but can't distinguish them from normal vectors that don't need freed