First off, these two options are not equal, at least in terms of the source code you pasted. First one also calculates perspective projection and lookat - both which can be calculated lazily and only when certain parameters change. If you do this every frame then its one thing thats wrong. In second example you don't even mention lookat or perspective matrix - where are these calculations?
The way you measure it is also wrong, as you said you're using frames/s and you should be using ms/frame.
Using proper matrices and sending them as uniforms (or UBO) is the right way. Plus, as you mentioned, use of glRotate and similar calls is deprecated, and thats perfect reason not to use that kind of code.