- Geography. US based companies in the Bay Area will almost always pay more than companies anywhere else in the world. Many companies have different compensation bands for different regions of the world, even within the US.
- Equity. The base salary for an entry level developer position at a top company will pay somewhere in the range of 110-130k. I've seen many entry level dev jobs at startups in the bay area paying in the 80-110k range (I can't speak to hard data that supports this though, because open salary information is hard to come across!). So, the salary differential when comparing upper/lower bands between top companies and median companies exists but isn't outlandish (between 20-40% more). The difference is, entry level devs at Google & FB will also get a 50k/yr equity grant. Based on my experiences, this is an order of magnitude more than the median company (where lottery tickets or 1-5k/yr grants are common).
So my personal advice for optimizing compensation would be:
1) Move to the US (Bay Area/NYC/Seattle) or work for a US (Bay Area/NYC/Seattle) company remotely or at a satellite office in another city. Obviously, everyone has personal restrictions so this may not possible.
2) Work for a company who you believe will have equity growth. There is a wide spectrum here between 5 person startup lottery tickets and established behemoth that have 0.5% YoY growth stocks. A good recent example of this is Square, which gave out equity grants that were something like 50% lower in cash value than the equivalent role's offer from a FAANG company (this is based off of personal anecdata). However, Square's stock exploded over the past year and that equity today outcompetes many of the equivalent FAANG-level offers. Of course, the opposite could have also been the case -- I've heard stories of underwater options being granted pre-IPO by Square. Sure, a few years later they're worth a lot, but at the time, employees weren't happy.
The world is wider than FAANG and tiny startups, and each company has its own set of hiring criteria (e.g. both Twitter and Square started as Rails shops so your Ruby experience would be more valuable to them than Google or FB). You can't predict the market, but if the choice is between 20 year old Company A that gives you 3k/yr in equity or a recently IPO'd Company B that gives you 1k/yr in equity, I would on average take the gamble with Company B (in practice taking into account team strength, product vision/market fit, & company direction after interviewing).