I have always heard that theory that templates are as powerful for generic programming as virtual functions. I decided to test that statement. In the end, templates worked out just fine, the code is no less elegant than it would be if I used an interface. And the code is not _really_ in a tight loop at the moment. In my defense I can only say that the code that's being replaced with the scheduler used to take 80% of CPU time, so I wanted the replacement to be very, very tight. May be tighter than it needs to be.