Some of the problems I had during implementation:
- Pseudo pseudo code. By this I mean that the code near the end of the paper wasn't lowlevel enough to call it pseudocode. E.g, 4 lines out of the pseudocode algorithm:
transfer Top to rung 1 of Ladder bucket k = recurse rung(); sort events from bucket k and copy to Bottom return first event from Bottom - Missing initialisations. Initialising variables is apparently optional.
- Missing code (show me where MaxTS and MinTS are adjusted)
- Missing considerations. E.g.
Note that if MaxTs is equal to MinTs, it means all the events in Top have the same timestamp. In this article we consider the mean jump to be finite and positive. Thus, the likelihood of this occurring is extremely low.
After which they ignore the issue completely. Apparently nobody seems to consider the possibility that there might only be one event in the Event Queue at the moment the first event is pulled out (this event's timestamp == MaxTs == MinTS, because of which BucketWidth == 0, which causes a division by zero and crash). This might not occur in normal situations but if you're gonna write an ADT, it better be correct all of the time.
I suppose it could be worse.
On an unrelated note, I'll be changing to the new openJDK7+coroutines way of life from the current sun JDK6+javaflow either tomorrow or today on both my development and my benchmark machines. We're hoping this will influence the results in a positive way.
Geen opmerkingen:
Een reactie posten