Metal performance seems not better than OpenGL in iOS
Describe the bug I tried iOS sample hello-gltf app, metal-backend gpu frame time is 7.5 ms, while opengl-backend gpu frame time is 6.8ms. the rendering time of opengl is also shorter than that of metal in instrument->GamePerformance.
To Reproduce Steps to reproduce the behavior: just change backend, both of them "build configuration" choose release.
Expected behavior metal performance better than opengl
Screenshots

Desktop (please complete the following information):
- OS: iOS
- Backend: [Metal/OpenGL]
Smartphone (please complete the following information):
- Device: iphone 11
- OS: 13.7
What are you rendering? With a scene with not many draw calls and mostly shader bound there's no reason for Metal to be faster if you look at vertex/fragment processing time on the GPU.
Also note that as long as you are under 16ms the GPU is probably not clocked as high at it can be, so exact timings are not really comparable.
I re-used a glb with 980018 vertices and 100011 faces on iphone 7 for test. And I enabled bloom, AmbientOcclusion, and fxaa. The result still seems to be that metal is not faster than opengl, and even the cpu usage rate of metal is 42%. , OpengGL is only 17%.
I tested it in iOS hello-gltf sample, the Screenshot below is the code I changed.

glb link: https://drive.google.com/file/d/1xwKpoiMxDfhLc8lMpknbA7w-VZRkrgvg/view?usp=sharing hello-gltf sample link: https://drive.google.com/file/d/1FT5adwJNCW1LU4CxTnKVUdrl2liO1934/view?usp=sharing
For this use case, there's no reason for Metal to be faster than GL on the GPU. CPU usage should/could be the same or better though, looks like we have improvements to make.
Is it convenient to give an example Metal is faster than GL?
Is it recommended to use opengl instead of metal even in iOS?
There are a handful of optimizations I'm working on to improve both CPU and GPU performance for Metal. You're welcome to use OpenGL, though the goal is to eventually remove support for it on Apple platforms.
I would not recommend using the opengl backend on iOS (not macos) because we're planning to remove support soon.
Also when doing performance comparisons you need to also look at other factors like GPU/CPU clocks. Sometimes, when some code is more optimized it runs slower but at a lower power usage. As long as rendering happens in less than the vsync rate, there is no problem.
And finally, there is no reason for metal to be significantly faster or slower than gl, it's the same GPU in the end.
There are a handful of optimizations I'm working on to improve both CPU and GPU performance for Metal. You're welcome to use OpenGL, though the goal is to eventually remove support for it on Apple platforms.
Could you share your optimization idea in details? How much improvement could we expected, and in which scenarios we can expect big improvements, and how soon is the optimization expected to be completed?
It won't be significantly faster than gl.
What kind of improvement are you hoping for?
This issue is a year-old and a bit vague, so closing. We do have some Metal-specific improvements in the pipeline, including using argument buffers to reduce CPU encoding time.