What is the mechanical advantage of mechanical rim brakes and levers?
Levers:
Here calculating the mechanical advantage is easy. It is the distance from
pivot to fingers divided by the distance from pivot to cable anchor.
Examples for levers:

Dia Compe 287V V-brake drop bar levers: 75mm / 29mm = 2.6x (approximately)
Tektro RL520 V-brake drop bar levers: 72mm / 33mm = 2.2x (approximately)
Shimano BL-R400 drop bar levers: 72mm / 14mm = 5.1x (approximately)
Some cheap Shimano V brake flat bar levers: 60mm / 38mm = 1.6x (approximately)

Note that the mechanical advantage of drop bar levers depends on where your
fingers lie on the lever. The mechanical advantages here were for braking on
the drops. On the hoods the fingers cannot reach as far down on the lever, so
with my hands, the numerator of the division is only 63mm. Then the mechanical
advantage of Dia Compe levers drops to 2.2x, Tektro RL520 levers drops to 1.9x and of BL-R400 drops to 4.5x, but
of course it needs to be remembered that the fingers are in an inoptimal angle on the
hoods, so the brakes feel even worse than what you could assume solely based on the
theoretical mechanical advantage. On flat bar levers there is only one braking position.
Brakes:
For single pivot sidepulls, the mechanical advantage can be calculated by
dividing the horizontal pivot-to-anchor distance by vertical pivot-to-shoe
distance. I do not have any single pivot sidepulls here, but if I search for
pictures of old Campagnolo Record single pivot sidepulls, their mechanical
advantage seems to be around 1.0x.
Sorry I don't have any dual pivot sidepulls here and I cannot analyze their
complicated mechanism without seeing the brake in real life as opposed
to seeing it only in pictures on the Internet. Thus, I cannot
analyze the mechanical advantage of dual pivot sidepulls. Presumably
it is higher, but how much higher I cannot say. Feel free to edit
this answer or to provide another answer for dual pivot sidepulls.
I saw detailed enough pictures of dual pivot sidepulls here: https://www.parktool.com/blog/repair-help/dual-pivot-brake-service -- from picture in &quot;6 CENTERING&quot; I estimated (using pixel-level measuring tool of Gimp) that the less forceful arm has a mechanical advantage of 269.3/278 = 0.969x and the more forceful arm has a mechanical advantage of 444/206 = 2.155x. Because there is a forced centering mechanism, the average mechanical advantage is about 1.6x and it applies to both arms of the brake due to the forced centering mechanism.
Cantilever mechanical advantage calculation is a bit tricky. I have developed
software for calculating mechanical advantage of Shimano BR-R550 cantilevers on
Surly Long Haul Trucker 28&quot; frame, where the vertical pivot-to-shoe distance is
31mm. On this frame, the Shimano Link Wire &quot;E&quot; gives a mechanical advantage of
1.5x. The Shimano Link Wire &quot;F&quot; gives slightly lower mechanical advantage.  A
benefit of cantilevers is that their mechanical advantage can be adjusted by
adjusting the straddle cable length (old brakes having the somewhat dangerous
straddle cable that can lock the brakes by dropping to a knobby tyre) or by
switching the link wire to one of different length (new brakes). A drawback of
cantilevers is that the mechanical advantage reduces when pads wear,
and is actually reduced as the pads move closer to the rim, so
mechanical advantage during free motion is high (bad as it means
low pad clearance) and mechanical advantage when pads have reached the
rim is lower (bad as it means low braking force).
There is an existing resource of cantilever geometry by Sheldon Brown but I believe it has a fatal
error in the mechanical advantage formulas: it uses the direct pivot-to-shoe distance
as opposed to the vertical pivot-to-shoe distance. Thus, it gives too low mechanical
advantages as the direct pivot-to-shoe distance is always longer than the vertical
pivot-to-shoe distance.
V brake mechanical advantage calculation is easy: divide the vertical
pivot-to-anchor distance by the vertical pivot-to-shoe distance.
Example on Surly Long Haul Trucker 28&quot; frame having 31mm vertical pivot-to-shoe
distance:

Some cheap &quot;MTB&quot; Shimano V-brakes: 103mm/31mm = 3.3x
Shimano BR-R353 &quot;road&quot; V-brakes: 86mm/31mm = 2.8x

The mechanical advantage of V brakes cannot be adjusted as opposed to that of
cantilever brakes. The mechanical advantage of V brakes can vary from frame to
frame and from fork to fork, as the location of pivots does not have a standard
with millimeter level accuracy.
Final mechanical advantage:
The final mechanical advantage (multiplication of lever mechanical advantage
and brake mechanical advantage) should be between 4.0x (if you like lots of
hand force) and 9.0x (if you like little hand force). Ratios above 9.0x run out
of lever travel quickly and thus require adjusting the barrel adjuster very
often, have excessively small pad clearance, so the brakes rub if the rim is
even slightly out of true or if the rim or frame/fork flexes, and the brakes
still have lots of free motion in the lever despite the small pad clearance.
Ratios below 4.0x require very strong fingers to brake.
We can determine the following combinations to be compatible:

Old Campagnolo Record sidepulls + BL-R400: 5.1x
Dual pivot sidepulls + BL-R400: 8.1x
Surly LHT + BR-R550 cantilevers + BL-R400: 7.7x
Cheap &quot;MTB&quot; Shimano V brakes + cheap Shimano flat bar V brake levers: 5.3x
BR-R353 &quot;road&quot; V-brakes + cheap Shimano flat bar V brake levers: 4.5x
Cheap &quot;MTB&quot; Shimano V brakes + Dia Compe 287V drop bar V brake levers: 8.6x
BR-R353 &quot;road&quot; V-brakes + Dia Compe 287V drop bar V brake levers: 7.3x
Cheap &quot;MTB&quot; Shimano V brakes + Tektro RL520 drop bar V brake levers: 7.2x
BR-R353 &quot;road&quot; V-brakes + Tektro RL520 drop bar V brake levers: 6.1x

Based on this, it can be concluded that Tektro RL520 is probably best paired with &quot;MTB&quot; V brakes and Dia Compe 287V is probably best paired with &quot;road&quot; V brakes. With &quot;MTB&quot; V brakes, one obtains more tire clearance, so that's certainly an advantage.
We can also determine the following combinations to be incompatible:

Cheap &quot;MTB&quot; Shimano V brakes + BL-R400: 16.8x (too high!)
BR-R353 &quot;road&quot; V-brakes + BL-R400: 14.3x (too high!)
Old Campagnolo Record sidepulls + Dia Compe 287V drop bar V brake levers: 2.6x (too low!)
Old Campagnolo Record sidepulls + Tektro RL520 drop bar V brake levers: 2.2x (too low!)
Old Campagnolo Record sidepulls + cheap Shimano flat bar V brake levers: 1.6x (too low!)
Surly LHT + BR-R550 cantilevers + Dia Compe 287V drop bar V brake levers: 3.9x (too low, may be near the threshold of acceptability on the drops but not on the hoods!)
Surly LHT + BR-R550 cantilevers + Tektro RL520 drop bar V brake levers: 3.3x (too low!)
Surly LHT + BR-R550 cantilevers + cheap Shimano flat bar V brake levers: 2.4x (too low!)
Dual pivot sidepulls + Dia Compe 287V drop bar V brake levers: 4.2x (even though this is larger than 4.0x, I marked this as &quot;incompatible&quot; because the braking on the hoods is still lower than 4.0x)
Dual pivot sidepulls + Tektro RL520 drop bar V brake levers: 3.5x
Dual pivot sidepulls + cheap Shimano flat bar V brake levers: 2.6x

So, it is important to use V brake levers for V brakes and to use traditional
levers for cantilevers / sidepulls. By making the V brake arms shorter, the
mechanical advantage of V brakes can be reduced, but with standard frame stud
locations, it is impossible to have low enough mechanical advantage (for
traditional levers to be usable) and enough
tire clearance. Of course frame makers can play tricks by moving the studs
lower, so that the vertical pivot-to-shoe distance is increased and then the
mechanical advantage of &quot;road&quot; V-brakes (such as BR-R353) can be made so low
that they can in a pinch be used with traditional drop bar levers. Still, it's
not ideal to use V brakes with traditional drop bar levers, as the mechanical
advantage of the entire system is very high even if the frame maker has played those tricks.