freenode/#sicl - IRC Chatlog
Search
14:22:13
Bike
might have to reconsider how effective method functions are passed their arguments. i think a general case might mean passing all the required arguments, all those objects' racks, and then further arguments could maybe be spread out to avoid reprocessing
14:22:35
Bike
like if you have a method with (&key a) and another with (&key b), the discriminating function could look for both keys and pass them along as regular arguments
14:24:20
beach
Certainly, argument passing within a generic function may be very costly if done the most general way.
14:24:50
Bike
yeah, right now on clasp each method function with &key deconstructs it. it's obviously suboptimal
14:26:17
Bike
i don't know how SBCL generic functions handle keyword arguments. but yeah i should figure it out, let's see
14:27:26
Bike
nope, looks like the fast method function still takes &key, so there will be reprocessing
14:28:33
beach
Also, SBCL doesn't depend as much on generic functions as, say, SICL will, and Cleavir already does.
15:45:37
heisig
Inlining the keyword parsing step is one of the most rewarding features of fast-generic-functions. But it is hard to do it without sealing all involved entities.
15:47:15
heisig
If we had an extensible annotation/recompilation mechanism for functions then "Doesn't call change-class" would be an excellent annotation.
15:50:54
heisig
Another convenience feature could be that (maybe only on safety 3) change-class inspects the stack and asserts that no method dispatch assumptions are violated.
16:34:39
jcowan
The Oracle JVM has a concept of lightweight locks, which are used initially. If a lot of contention takes place, the lock is upgraded to a heavyweight lock.
16:44:22
jcowan
Spin locks are used first, but if they time out, then the regular locking mechanism kicks in. A lightweight lock involves only single CaS operation that gets inlined, whereas a heavyweight lock maintains a per-lock queue and a non-inlined procedure to manage it.
16:48:13
beach
My (admittedly small) family just announced that dinner is served. After dinner, I will spend time with her. I might check in later. If not, I'll be back tomorrow morning (UTC+2).
21:17:02
Bike
i realized i could reuse most of the ctor code for a dfun for reinitialize-instance, so i tried that out. in the simplistic case of one keyword argument and no custom methods, it's about fifty times faster than calling reinitialize-instance