I’ve heard drawing with VertexBuffer and DrawIndexedPrimitives is a lot faster.
It can be depending on what you are doing and how you are implementing it.
Instancing is a order of magnitude faster but its really used for whole models or meshes or particles.
That is only barely hinted to in the bottom of the example ill post.
can someone show me a minimal example of how to use it?
The below is a minimal example for using DrawIndexedPrimitives or DrawPrimitives in a similar context as well as a few other simple related concepts that are associated with it.
Take Note…
This is a minimal example and as such it is not specifically tweeked to for any particular thing other then to demonstrate ideas, in this way it is even more inefficient speed wise then not as it is. In fact this example is just put together for clarity with a lot of related parts. So you can see how it relates to the current spritebatch calls, However you would not want to use it in such a sloppy manner in your own project.
Once you can see how its working you would want to streamline your own version to be efficient for you and fast for what you are doing specifically.
There is a ton of stuff i do in the above example that is inefficient as im just trying to clump ideas together that are related to each other. For instance the vertex and indexs should not be recreated every frame if avoidable same for the states they should be created and saved and only updated when neccessary same with setting much of the things set to either basic effect or the custom effect. So as you can see there is a lot in the example that is not efficient at all but done so people can see the concepts fit together.