My small collision engine.
For dinamic/static collision used binary search index, so time~=D*log2(S) where (D-number of dynamic objects, S-number of static objects). You can use any speed of objects, it will accurate and don't skips static boundaries.
Example with html5 canvas: http://phy2d-testbed.appspot.com