The 5850 has some shaders disabled and is clocked lower than a 5870.
The 5870 is faster, but the pricing on both cards would dictate if it is worth the higher price.
Also note that both these cards are a few generations out of date; you can probably find something newer and faster in your price range.