Most efficient blockmin function?

I have moved this thread to the Programming forum.