If you rank really well amongst a crappy cohort, you will be the person setting that standard and receiving the highest marks. That means you probably need to work pretty hard to set that standard.
If you rank decent amongst a strong cohort, hope that the relative gaps between each person are really small.
If you're capable of topping the subject with the crappy cohort, I think you should do it because a rank 1/whatevernumber is better than like a 20/whatevernumber (but then again it would depend on the relative gaps, etc)
Good luck with your choice!!