Butter and flour a 9- by 5-inch loaf pan (8-cup capacity).
In a bowl, with a mixer on high speed, beat 1/2 cup butter and the sugar until fluffy, about 3 minutes, scraping bowl occasionally. Add eggs and beat until well blended. Stir in bananas.
In a small bowl, mix 1 1/2 cups flour, cocoa, baking powder, and salt; add to banana mixture and mix just until evenly moistened. Stir in pecans if using. Pour batter into prepared pan.
Bake in a 350° regular or convection oven until a thin wood skewer inserted in center of loaf comes out clean, 45 to 55 minutes. Cool in pan on a rack for 10 minutes, then invert loaf from pan and cool completely on rack, about 1 hour.