2012-05-06

Current work on the Ladder Queue

Good morning everyone

(You guys asked for that one...)

So, after fixing the RCur problem and finally getting a successful run of my test suite, I realised that at no point I actually had more than one rung in my ladderQ (it's a good thing multiple rungs are so hard to create, it means the ladderQ is reasonably efficient). So I forced the creation of a new rung by adding a lot of events that are really close together in time. This revealed (as expected) a number of other problems. For example, there are two ways of creating a new rung:

  • The first bucket of the lowest rung is getting too full
  • The bottom structure is getting too full
In both of these scenario's I think I need to evaluate all events that need to be moved to the new rung to know their lowest and highest TS, so I can do a decent job of setting RCur, RStart and BucketWidth for that Rung. The reason I didn't do this in the first place is that in the pseudocode, the function create_new_rung simply does something like this:

BucketWidth[NRung] = BucketWidth[NRung-1]
RSTart[NRung] = RCur[NRung] = RCur[NRung - 1]
 
which is a strange thing to do, since that way there's really no way for the bucketwidth of two rungs to differ. And that's a pretty essential feature (they even use an array to indicate this value differs for different rungs, so once again I don't know what they were thinking). It should be a reasonably easy problem to solve.

Geen opmerkingen:

Een reactie posten