When is Software faster than Hardware?