Atelier des rouesLab FR
Objects/Documentation

index10.py

I provide the computation for “The cost of a prefix in four representations”.

Download ↓
"""Fixed/adaptive delta directories, Elias-Fano selection and bounded LRU fallback."""
from math import gcd
from bisect import bisect_right
from struct import pack,unpack_from
from collections import OrderedDict
from time import perf_counter_ns
from statistics import median
import json
M=30030

def positions():return [x for x in range(M) if all(gcd(x+h,M)==1 for h in (0,2,6))]

class Delta:
    def __init__(self,xs,steps):
        self.dir=bytearray();self.payload=bytearray();i=0
        while i<len(xs):

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.