Debian Codegraph @

etc/ratios.py

raw symbols SCIP
1 #!/usr/bin/python3
2
3 curves = {}
4
5 try:
6 while True:
7 line = input()
8 curve, variant, time = line.split()
9 if curve not in curves:
10 curves[curve] = {}
11 curves[curve][variant] = float(time)
12 except EOFError:
13 pass
14
15 for curve, variants in curves.items():
16 def compare(fiat, other):
17 if fiat in variants and other in variants:
18 print(curve, variants[other] / variants[fiat])
19
20 compare('fiat_solinas64', 'gmpvar64')
21 compare('fiat_solinas32', 'gmpvar32')
22 compare('fiat_montgomery64', 'gmpvar64')
23 compare('fiat_montgomery32', 'gmpvar32')