Re: OrderedSet pitfall
2011-06-01 00:33:11 GMT
> It would be better to just send you the code. The design I last > implemented is thread safe (with semaphore only needed for growth). > Sequence and primitives avoid semaphore costs while keeping it thread > safe. It is a design that I've shared before, so there may be some > related history. I can take a look at it, sure. > Being "pluggable" can mean many things. I assume you are saying that > it can have either weak keys, values, both, or neither (mine does > that too). I mean pluggable in that you can define how #= and #hash are implemented by the objects in question. It does not have pluggable storage strategies. >> "megamorphic message sends" > I'd never heard term, but I think I get the gist of it. Well, more precisely it should be "megamorphic message send sites"... or send sites where the number of classes overflows the caching capacity of a PIC. Good examples of megamorphism can usually be found by looking at places where classes receive messages. For instance, isKindOf: has a strong tendency to become megamorphic. If method dictionaries were hashed collections, then horrific cases such as awfulSlow := Object withAllSubclasses reverse. Time millisecondsToRun: [awfulSlow do: [:each | each isKindOf: Object]] would run anywhere from 40% to 70% faster. Of course the above is not(Continue reading)
RSS Feed