From: Douglas K. <do...@go...> - 2015-07-09 13:45:09
|
Flushing often is not a bad thing. It's not a super important cache, and it's nasty one from a garbage-retention perspective. Unlike all the other cached functions whose inputs and outputs are CTYPE subtypes, so little trees of small structs whose leaves are symbols, the CTYPE-OF cache caches anything, but it's not using weak pointers. (To be fair, all EQL types retains the object they point to; and PCL has a similar problem with EQL specializers) I suspect that I'd like to make the cache use weak pointers, or possibly reduce the size if not using weak pointers, and make it use double-wide CAS on x86-64 so that allocating a new cache line does not cons, *and* implement your suggestion too. (Not in that order. The flush-1-line function is probably the easiest change) In terms of the other callers - most uses are only because it's the faster thing than ADJUST-ARRAY, but logically they mean to be doing ADJUST-ARRAY and are just cheating for a little bit of speed. (for 'stream.lisp' and 'reader.lisp' this is for certain) Can there be made a function which only clears the cache for a > particular array? And set-array-header is being called by other > functions, not just adjust-array, is ctype-of-cache-clear needed for > them as well? > |