mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
Payments and commerce
promotions-engine
coupons and promotions engine
Shopify discounts
System
Techniques · 8
Primitives · 34
promotions-engine
Mixed-integer programming (branch a…
optimization · medium: Solves LPs with integer variables by solving the LP relaxation, branching on a fractional variable, and pruning subtrees whose LP bound cannot beat the incumbent.
›
A/B testing (online controlled expe…
statistics · medium: Randomly split units into arms by a salted hash, log exposure, compare metrics with a confidence interval, and guard the result with sample-ratio, guardrail and peeking checks.
›
Rete rules engine
systems · medium: Match many rules against changing facts by caching partial matches in a shared network, so each change only does the work it actually affects.
›
Cutting planes
optimization · medium: Valid inequalities added to an LP relaxation to cut off its fractional optimum without removing any integer point; the engine of branch-and-cut MIP solvers.
›
Presolve reductions
optimization · medium: Cheap, provably safe reductions run before the solver (fix variables, drop rows, tighten bounds and coefficients) so LP and MIP solves start from a smaller, tighter model.
›
Hypothesis testing
statistics · medium: Pick a test statistic, compare it to its distribution under "no effect", read off a p-value, and control error rates across one test or many.
›
Sequential hypothesis testing
statistics · medium: Group-sequential and alpha-spending designs for interim analyses without inflating error
RCU (read-copy-update)
concurrency · low: Readers access shared data with no locks or atomic writes; writers publish a new copy and free the old one after a grace period.
›
Sharded counters
concurrency · low: Split one hot counter into per-core or per-thread cells on separate cache lines; increments stay local and reads sum the cells.
›
Bloom filter
data-structures · low: Bit array answering "definitely not present" or "probably present" in about 10 bits per key for 1 % false positives; inserts are cheap, deletes impossible.
›
Interval tree
data-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.
›
Idempotency keys
finance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.
›
Largest remainder rounding
finance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorations
Money representation
finance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.
›
Csprng
security · low: OS-backed cryptographically secure random numbers (getrandom), and when a fast PRNG is not enough
Optimistic concurrency control
storage · low: Run transactions without locks, record what they read, and validate at commit that nothing changed; fastest when conflicts are rare.
›
d-ary heap
data-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.
›
Simplex method
optimization · low: Solves linear programs by walking along the edges of the feasible polytope from vertex to vertex, one basis swap (pivot) at a time; the workhorse behind MIP solvers.
›
Bootstrap confidence intervals
statistics · low: Resampling-based confidence intervals for arbitrary statistics
CUPED (variance reduction with pre-…
statistics · low: Subtract the part of each unit's outcome that a pre-experiment covariate predicts; the effect estimate stays unbiased and its variance shrinks by 1 - rho^2.
›
Experiment layering (overlapping ex…
statistics · low: Partition the tunable parameters into layers, hash each unit with a per-layer salt so layers are independent, and give experiments inside a layer disjoint bucket ranges.
›
Deterministic bucketing
systems · low: Hash a stable unit id with a per-purpose salt into a bucket; "in" means bucket below the percentage, so assignment is stateless, repeatable and only grows on ramp-up.
›
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
+ 1 more techniques
+ 18 more primitives
System
Techniques · 8
Primitives · 34
promotions-engine
Mixed-integer programming (branch a…
optimization · medium: Solves LPs with integer variables by solving the LP relaxation, branching on a fractional variable, and pruning subtrees whose LP bound cannot beat the incumbent.
›
A/B testing (online controlled expe…
statistics · medium: Randomly split units into arms by a salted hash, log exposure, compare metrics with a confidence interval, and guard the result with sample-ratio, guardrail and peeking checks.
›
Rete rules engine
systems · medium: Match many rules against changing facts by caching partial matches in a shared network, so each change only does the work it actually affects.
›
Cutting planes
optimization · medium: Valid inequalities added to an LP relaxation to cut off its fractional optimum without removing any integer point; the engine of branch-and-cut MIP solvers.
›
Presolve reductions
optimization · medium: Cheap, provably safe reductions run before the solver (fix variables, drop rows, tighten bounds and coefficients) so LP and MIP solves start from a smaller, tighter model.
›
Hypothesis testing
statistics · medium: Pick a test statistic, compare it to its distribution under "no effect", read off a p-value, and control error rates across one test or many.
›
Sequential hypothesis testing
statistics · medium: Group-sequential and alpha-spending designs for interim analyses without inflating error
Sequential probability ratio test
statistics · medium: Add up the log-likelihood ratio per observation and stop when it crosses a fixed bound; the least data of any test with the same error rates (for two point hypotheses).
›
RCU (read-copy-update)
concurrency · low: Readers access shared data with no locks or atomic writes; writers publish a new copy and free the old one after a grace period.
›
Sharded counters
concurrency · low: Split one hot counter into per-core or per-thread cells on separate cache lines; increments stay local and reads sum the cells.
›
Bloom filter
data-structures · low: Bit array answering "definitely not present" or "probably present" in about 10 bits per key for 1 % false positives; inserts are cheap, deletes impossible.
›
Interval tree
data-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.
›
Idempotency keys
finance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.
›
Largest remainder rounding
finance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorations
Money representation
finance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.
›
Csprng
security · low: OS-backed cryptographically secure random numbers (getrandom), and when a fast PRNG is not enough
Optimistic concurrency control
storage · low: Run transactions without locks, record what they read, and validate at commit that nothing changed; fastest when conflicts are rare.
›
d-ary heap
data-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.
›
Simplex method
optimization · low: Solves linear programs by walking along the edges of the feasible polytope from vertex to vertex, one basis swap (pivot) at a time; the workhorse behind MIP solvers.
›
Bootstrap confidence intervals
statistics · low: Resampling-based confidence intervals for arbitrary statistics
CUPED (variance reduction with pre-…
statistics · low: Subtract the part of each unit's outcome that a pre-experiment covariate predicts; the effect estimate stays unbiased and its variance shrinks by 1 - rho^2.
›
Experiment layering (overlapping ex…
statistics · low: Partition the tunable parameters into layers, hash each unit with a per-layer salt so layers are independent, and give experiments inside a layer disjoint bucket ranges.
›
Deterministic bucketing
systems · low: Hash a stable unit id with a per-purpose salt into a bucket; "in" means bucket below the percentage, so assignment is stateless, repeatable and only grows on ramp-up.
›
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
Hash join
storage · low: Build a hash table on the smaller input's join key and probe it with every row of the larger one; the linear-time workhorse for equi-joins.
›
Arena allocator
systems · low: Allocate by bumping a pointer through big chunks and free everything at once: a few instructions per allocation for objects sharing a lifetime.
›
Floating-point error
numerics · low: How IEEE 754 rounding error accumulates and how to contain it: compensated (Kahan/Neumaier) and pairwise summation, error-free transformations with FMA, ULP comparisons.
›
Fast hash functions
data-structures · low: Non-cryptographic hashes built from 64×64→128-bit multiplies and xor-shifts; pick by key size, trust level and whether the hash is persisted.
›
Interval arithmetic
numerics · low: Rigorous bounds with outward rounding; root isolation and robust geometric tests
Sparse matrices (CSR)
numerics · low: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.
›
Wilson score interval
statistics · low: Wilson lower bound for ranking by up/down votes and proportions with few samples
Bayesian rate estimation
statistics · low: Estimate a conversion or event rate from few observations with a Beta-Binomial or Gamma-Poisson update: two counters, an honest interval, and P(B beats A) directly.
›
Loglikelihood scoring
machine-learning · low: Scoring choices by summed token log-probabilities, normalization by length, perplexity computation
False sharing
concurrency · low: Independent variables written by different cores on one cache line force the line to bounce between cores; pad or regroup hot data to fix it.
›
Memory ordering
concurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
›
Fencing tokens
distributed · low: A number that grows with every lock grant and is checked by the protected resource, so a paused ex-holder's late write is rejected.
›
Leases
distributed · low: A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.
›
CPU caches and the memory hierarchy
hardware-os · low: Sizes, line widths and latencies of L1/L2/L3/DRAM on modern x86 and Apple M-series, and the data-layout rules that follow from them.
›
LU and Cholesky factorization
numerics · low: Factor A = PLU (any square matrix, partial pivoting) or A = LLᵀ (SPD) once in O(n³), then solve each right-hand side in O(n²).
›
PRNGs (PCG, xoshiro)
numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.
›
Cryptographic hashes (SHA-2, BLAKE3)
security · low: Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.
›
Exponential backoff with jitter
systems · low: Retry after delays that grow geometrically and are randomized, so failed clients spread out instead of hammering a recovering service in synchronized waves.
›
Copy for AI
Similar systems
Share the most building blocks with this one.
tax-engine
32 %
booking
17 %
accounting
17 %
airline-reservation
17 %
utility-cis
17 %