If you are talking about performance, it depends on how efficient you are with your onDraw().
When you define a view in XML, all you are doing is telling the layout inflater to create an instance of the view type class and set it's initial properties to the XML attributes you define. Then, when the view is drawn, guess what - it's onDraw() is called to draw the view.
So, if you extended the View and overrode the onDraw() and used exactly the same method to draw the view as it's super class would use, then there is no performance difference.
So, the answer (if indeed you are asking about performance) is "it depends".
Likewise, just as you could be inefficient in your onDraw(), you could be inefficient in your layout design. Redundant view groups, like nested LinearLayouts, RelativeLayouts etc can have a very big negative impact on performance. The layout hierarchy viewer is a great tool to get to know.