Atelier des rouesLab FR
Objects/Documentation

mesures24.py

Rational transport and checks · mesures24.py

Download ↓
"""Time production of the specialized primal and the generic primal-dual certificate."""
from fractions import Fraction as F
import json,platform
from time import perf_counter_ns
from jeu24 import load,table,decode,certificate,sizes

def study():
    d=load('jeu24');rows=[]
    for index in (2,38):
        case=d['anchored'][index];s=table(case['source']);t=table(case['target'])
        calls=[lambda:decode(*s[:2],*t),lambda:certificate(s,t)]
        for fn in calls:fn()
        for rep in range(3):
            results=[None,None]
            for i in ((0,1) if rep%2==0 else (1,0)):
                tic=perf_counter_ns();result=calls[i]();ns=perf_counter_ns()-tic

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.