Before. A lot of grains develop much more complex and nutty flavors when you pre toast them. I think it is more of the
Maillard reaction, caramelizing the sugars creating new flavor compounds, etc.
Supposedly this is true of chocolate, but not pre-toasting. I think you are supposed to pour boiling water over the cocoa powder and it intensifies the chocolate flavor.
Some nuts are also more flavorful when toasted, hazelnuts for example.