Both are good and equally helpful but if you wish to concentrate one at a time then forum posting is the best one it will give you permanent back links with adequate information.
Why not do both? Some blogs can really get you noticed, while forum posting can also establish your brand on the long run, especially since you can post more replies than in a blog (unless it's a 100 articles/day blog )
Leaving backlinks on a lot of non-niche forums and blogs is not a good idea, unless it is backed up with a serious number on niche sites, it's far better to focus on niche sites and blogs, in the long run the rewards will be greater.
I personally myself use both these methods however I would say that forum posting is the one I use the most. I wouldn't say myself that either is better than the other as depending on which method you use the most will depend on how well it works for you so for someone who uses forum posting alot more like me will see better results than blog commenting.