libera/#sicl - IRC Chatlog
Search
7:06:22
froggey
Mezzano also uses the combined header/rack representation for standard instances and has for a few years now
7:10:06
froggey
yes, CHANGE-CLASS (and also updating obsolete instances) allocates a new instance and changes the old object's header to point at it
7:20:24
beach
1. My memory and my available energy for work is much less compared to maintainers of Mezzano, Clasp, and SBCL. So I could not cope with an optimization that complicates things in ways that give me more work and more things to keep track of. Especially if the gain is not proven.
7:21:07
beach
2. It would require a complete redesign of the SICL garbage collector, because it depends on headers (and CONS cells) to be two words so that they can all be managed in a free list.
7:22:14
hayley
Yes, I would not recommend this technique as it complicates the garbage collector. But it was interesting when I first heard of it.
7:22:27
beach
3. It seems to me that with this technique, you would either need to allow for pointers into the original object, so that different threads could update the old rack even after it has been abandoned. Or else you would need a lock for the object so that no other thread is accessing the old rack.
7:23:31
beach
This is another huge complication for the garbage collector, and I am wondering whether the gain in performance of the mutator would make up for the additional work in the garbage collector.
7:25:45
beach
I am betting that the concurrent and parallel GC design of SICL will compensate for perhaps some additional work in the mutators. So I am very reluctant to changing the GC design for a, perhaps small, gain in mutator performance.
7:25:49
hayley
I was also going to ask about thread-safety, but at the time I was more concerned with how maintaining the locality after CHANGE-CLASS would presumably require a moving collector, which either then precludes an on-the-fly GC or requires more mutator overhead.
7:27:55
beach
I mean, they can argue that it is no worse than always having separate headers and racks, and almost always at least as good.
7:29:12
moon-child
in general, I tend to bias towards more work in the gc, because it means that you can avoid the gc on performance-critical paths. But I think your other arguments are valid
7:31:08
beach
I see. Well, I want SICL to be good for real-time processing and generation of sound, and sound is much more sensitive to GC pauses than (say) video.
7:33:36
hayley
Hopefully performance-critical code has temporal locality of reference, and then fetching one more cache line per object once averages out over many accesses.
7:33:37
beach
None of this stuff has been tested in real situations, of course, so the verdict is still out.
7:35:50
hayley
I can't say I do any performance-critical stuff which is normal. The most performance-sensitive thing I have written is a server which basically always sends dirty cache lines around a few threads, so I can't speak on optimizing that sort of stuff.
7:37:59
hayley
(Though I am considering chunking elements to put on queues so that it doesn't have to be modified so often. But then if I make the chunks too large, I end up with a less "fair" scheduler by some description. How fun.)
7:39:08
beach
Also, performance is not my highest priority for SICL. Debugging support and maintainability are higher on the list. It would be totally fine with me if people use SICL for development and SBCL for deployment.
7:41:52
MichaelRaskin
Finally a chance that my rant about local variables will not apply at least to some implementation.
7:45:39
beach
... unless the Common Lisp HyperSpec says it is undefined behavior, in which case this should be a WSCL issue.
7:48:55
beach
Well, there is no particular reason to make such access impossible even in the presence of constant propagation, other than developer convenience.
7:49:59
beach
I think we had this discussion the other day, but also in the presence of strength reduction in loops, it is usually possible to do the (often linear) calculation in reverse for the purpose of the debugger.
7:50:34
MichaelRaskin
Oh, that would be cool; I probably wasn't paying attention to the channel at that time
7:51:10
MichaelRaskin
My not always paying attention to #sicl is surely a true fact that doesn't need being dreamed of
7:53:52
MichaelRaskin
Sure, I understood that. Just wanted to confirm that a priori probability of the other case is definitely very high
7:54:42
beach
So in many cases, it is possible to pretend that a variable is live for the purpose of debugging, even though it has been optimized away. It may not always be allowed to alter the value of that variable, but altering values of variables is tricky business anyway, because the compiler may have made assumptions about the types of the values.
7:55:41
beach
Some implementations would then perhaps let it happen and have the system crash or (worse) give the wrong result. I am not interested in that kind of trade-off for SICL.
7:56:01
MichaelRaskin
I guess my absurd-ish rewriting technique just breaks many of the optimisations. Which is fine, because it is to force debugging information be available speed be ignored.
7:57:02
MichaelRaskin
Fortunately it does so openly enough that the optimiser just shrugs at that code and walks away instead of breaking things
7:57:44
beach
Certainly. I am convinced that you technique doesn't break anything, except perhaps buggy compilers.
8:17:25
beach
I added a few more links to http://metamodular.com/SICL but I still have another 10 to put in. I'll do one or two per day.
13:48:00
beach
I think I have a version of MAKE-ARRAY that is not very optimal, that lacks certain checks on the arguments, and that can not handle displaced arrays, but it seems to be enough for Eclector to create an instance of.
13:49:16
beach
Soon, we will have a person coming over in order to determine whether we qualify for government a subsidy for better insulation in the roof, so I'll be on and off for the rest of the day.
14:01:42
beach
I am pretty excited about this progress, because of several things. First, I had anticipated more trouble with MAKE-ARRAY, so that was nice. Then, Eclector is the last external library that needs to be loaded before we can work on creating an executable with a RPL.
14:01:43
beach
There is more work for such an executable, of course, but it doesn't involve external libraries. We need a primitive call-site manager, and we need code generation. And, the biggie, the creation of an initial target first-class global environments, and then mapping all that to the global heap.
14:35:38
beach
The insulation person will be here shortly, so I'll be away for a while. Not sure how long it will take, but no more than half an hour I would think.
15:18:00
beach
Well, that was quick. Our insulation is not only great for the time the house was built in 1993. It even conforms to the more recent, more demanding, norms of today. So no work is needed.
15:56:36
beach
I am about to call it a day. But I'll stick around until my (admittedly small) family announces that dinner is served in an hour or so.
16:57:10
beach
My (admittedly small) family just announced that dinner is served. I'll be back tomorrow.