Both of your implementations are very inefficient. You're doing more to profile your CPU than your GPU or the GL driver.

There's no need to:


constantly unbind a program after use,
...