As a developer, you want to be in control of the system, not the other way around. Well, at least, with Linux, you're much more in control, and have ways to be more efficient in your work.
Regarding the constraints you mentioned:
* cost: it's often posible to find good deals online on expensive but high quality professional machines like the thinkpad x1 Carbon. Have a look at second-hand sites, auction sites. Some sell refurbished machines, under warranty, as good as new.
* performance: you may want to use a lightweight linux distribution, consuming only a few hundred Megs of RAM, and leaving more to your build system... Oh, and try to use something stable, e.g. debian rather than ubuntu. Focus on your work, not on troubleshooting regressions.