2011-11-18

This week's progress

Other than meeting with Silas on Wednesday, this week I
  • Finished and pretty much rewrote the Queue based on a ConcurrentSkipListMap. Originally this queue used keys that were generated from the events it received (not that quick a task because of the whole ProcessInterface inheritance check in SchedulableMulticoreComparator). These keys then implemented SchedulableInterface so they could be used without rewriting SchedulableMulticoreComparator.

    I later realised that it would be much better to use the events as keys themselves and map them to something like an Integer (putting null in as the corresponding value causes problems with the delete operation on the queue...)

  • Found a simple SkipList implementation on the internet and transformed it so it can be used (eg make it use a comparator).
  • Made the queue used a field in the configuration that cna be changed at runtime. An enumeration is constructed from this field and later passed to a Factory that constructs a Queue used in the core.
  • Made a little python script that runs the simulator with different queues.
I also tried timing a few runs with different queues but noticed no measurable differences. The differences between several runs using the same queue are waaaaaaaaaaay too big unless incredibly stupid things happen in the queue. Profiling reveals less than 3% of total time spent in the relevant add() method (in reasonable implementations of the queue), which is still pretty far in the margin of error because of differences in temperature in the room (laugh all you want, I'm sure of it), search indexers that suddenly start running, automatic changes in process schedulers in operating systems etcetera.

Geen opmerkingen:

Een reactie posten