Here is my take on it, as someone on the other side of the desk:
Two factors are more important than the exact cost to the dealer:
1. Are you a local customer/repeat client? A dealership will make more than a few fundred just from warranty and schedule maintenance service.
2. Are you there in person? Internet is great, but online shopping is not a guarantee for the best price. You sitting in my office with the checkbook in hand is the best language my sales manager will understand. Come prepared, ready to buy, the car in stock - anything can happen.