So I can give a bit of background on the historiography of Soviet crimes and atrocities - the tl;dr is that Snyder's number is about correct, but Snyder is not a very good historian and I would not use him as a main source for this.
The grand old man in this context is Robert Conquest, who wrote the definitive works of his day in the -60's and -70's, The Great Terror and The Harvest of Sorrow. Both are eminently readable to this day and I highly recommend them to anyone interested in Soviet history.
However, Conquest's works had shortcomings. The one that is most obvious if one is familiar with more modern treatments is that he is operating very much within a framework of "totalitarianism". This is a historiographically almost obsolete point of view that remains common in popular discourse, that views the U.S.S.R. and Nazi Germany as "two sides of the same coin". Most modern historians restrict such comparisons to very limited contexts (e.g. the use of civilian police forces in state control). One of several apparent failures of the model is its treatment of Stalin as a Hitleresque absolute despot far too early in the timeline. Another is the assumption that the USSR and Nazi Germany had the same or very comparable aims.
Conquest had a method of estimating death tolls that was highly banal. It consisted of extrapolating a growth curve for the U.S.S.R. (if I recall correctly, it was based off highly optimistic projections by the Politburo, but don't quote me on that), noting that the data came up about 20 million short, and flawlessly concluding that 20 million must have died as a result of Soviet policies; the vast majority due to famines caused by the collectivization in the early 1930's.
The more vicious aspect of this, in my view, is the construct of the "Holodomor" ("Death by Famine"), widely promoted by Ukranian nationalists. This is a kind of modern foundation myth in the same vein as the Polish "double genocide" thesis, maintaining that the famine in Ukraine was a deliberate effort to stamp out Ukranian nationalism ("And nevertheless, we survived, look how far we have come!" etc etc). I don't recall that Conquest ever states this outright, but it's very easy to read this into his work, and countless authors have drawn upon him to support this thesis. The most significant reveal of the Soviet archives is that there is absolutely no evidence of such a deliberate policy. The Central Committee were dumbstruck and confused by the reports coming in, and Stalin's position was significantly weakened as a result of the short-term failures of his collectivization efforts.
That's not to say that the U.S.S.R. does not bear a great deal of responsibility for the atrocity that the famine was - as someone once pointed out, the idea of risking starvation so that you can buy tractors that will be obsolete in ten years is hardly humanitarian, or even very sensible. But the Soviet collectivization was hardly very different from myriad other efforts at either "modernization", or highly extractive policy - some of the best comparisons include Britain's responsiblility for the Great Irish Famine, and the Indian famines caused by the promotion of cash crops; these contain very similar features (including apparent refusal to acknowledge the famine out of ideological convictions and continued exportation of grain). The best recent work on Soviet policy was done by Davies and Wheatcroft, as far as I know.
The "great purge" is an example of more direct state violence, but it also needs to be understood within the context of institutionalized denunciation as a method of breeding loyalty (which Stalin did not invent!). The stark rejection of the idea by Kruschev and Brezhnev was in a way highly cynical, as they were its greatest benefitters by far. I have encountered some recent suggestions that Stalin never had that much control of it (although he certainly did not go to great lengths to stop it), but I imagine such assertions remain highly contentious, as does the degree of ultimate responsibility that the NKVD chief Yezhov had.
Ultimately I'm not a big fan of these comparisons. The Great Famine of the early 1930's, the Great Purge, and the Holocaust were all horrors that need to be understood and contextualized in their own right. I think the most important thing to understand is that the Holocaust was highly anomalous as far as mass death goes. One of the greatest disservices that has been done to the modern study of human rights catastrophes is the tendency both in the public and professional sphere, to treat the Holocaust as the prototypical mass killing. On the contrary, the complete irrationality and institution of a central state policy to focus on literal physical extermination that characterized the Holocaust are very rare. That doesn't mean we shouldn't study other atrocities - on the contrary, we should! But we should not automatically use the Holocaust as a measuring stick.
As for deaths under Mao, the pattern was broadly similar to that of Stalin. Probably the main difference is that whereas Stalin's base was workers, Mao was genuinely popular among peasants. Mao was eminently cynical about deaths of common people in China - after all, there were so many of them. The broadest cause of disaster during the Great Leap forward was that Mao had unrealistic expectations which his subordinates were afraid not to meet, leading to plunder and corruption. The death toll there is much harder to establish, but about 20 million is probably a good ballpark esitmate. Deaths under famine are notoriously hard to estimate - do you count numbers due to decreased fertility? Miscarriages? Infant deaths? Only deaths of children over a certain age? etc, and this can lead to very large shifts that means that the raw number does not always reflect the human experience. Very large numbers such as 70 or 100 million seem to derive of an old Confucian tradition (also apparent in estimates of the Taiping rebellion 100 years earlier) of counting three generaitons - i.e., for ever man who died, you also count the loss of his future children and grandchildren.
Amartya Sen did some interesting work based on the notion of the death rate going down, noting that India had not seen a similar decline in mortality, concluding that, according to a certain calculus, the more market-oriented policies of India had caused more harm than the collectivist ones of China.
I think it is important to note, to keep things in perspective, that overall mortality went down even during the Great Leap Forward. Yeah, being a Chinese peasant sucked. The total death toll lands at around 2-5% of the affected population depending on your numbers, which makes it less severe than a lot of other famines in comparable situations, including the Great Irish and Great Indian famines; even the Bengal famine, arguably.
I definitely think that deaths as a result of Stalinist-style collectivization are a category worthy of study, but it's also useful to not think of these as isolated "Communist crimes", but part of a broader category of atrocities resulting from extractive policy. You see very similar patterns with colonialism and imperialism. And I think we should be careful when comparing either to Nazi crimes - parallels exist (Nazi mass murders definitely had genetic links to colonial atrocities), but one must be careful to restrict the context in which they are made.