Postgres jsonb vs composite type performance differences
It's not really a question of performance,


Composite Types are strongly typed meaning you have to define their shape.
JSON is weakly typed.


Moreover, JSON has a use case, but with a composite type you almost never want to use them because it's almost always better normalizing them into their own relations. There is an exception to that though -- when you're going to create a whole library around a set of data then composite types can make everything and nicer. For example stdaddr in PostGIS is one such example. That type represents a physical address and multiple things can take that type (like the PostGIS geocoder).

So you can do 

CREATE TABLE foo ( foo_id int, address postgis.stdaddr );


now you can get the geocoded information relatively easily and you only have to pass around one value rather than 15.