Same workflow, different charges

Two methods can finish the same declared work in one unchanged joint workflow, yet swap places in an accounting score. The difference can be where a shared setup cost—in seconds—is assigned.[3]

Consider an entirely synthetic workflow. A completes 100 authored items in 8 exclusive seconds. B completes 100 in 10 exclusive seconds. Another 4 seconds belongs to shared setup and teardown. Assume these three durations are sequential, do not overlap, and cover the whole declared workflow. The joint total is always 22 seconds.[2]

Charge all 4 shared seconds to B. A receives 8 seconds and B receives 14, so their attributed rates are 100/8 and 100/14 items per second. The A-over-B ratio is 14/8, or 1.75. Charge all 4 seconds to A instead: the accounting totals become 12 and 10, and the ratio is 10/12, or 5/6. A now has the lower attributed rate. Neither the work nor the joint elapsed total changed.[2]

Wholly invented joint workflows. Each arm has 100 authored correct, completed items; seconds do not overlap.

CaseA exclusive (s)B exclusive (s)Shared (s)Joint total (s)A/B attributed-rate range
Robust4102165/3 to 3
Can flip8104225/6 to 7/4
  • Every allowed allocation charges the shared pool exactly once: x to A, H−x to B.
  • The second case ties at x=3 seconds. Ranges describe allocation choices, not statistical uncertainty.
  • Work items and shapes are fictional; correctness and completion are declared, not measured.

Count the pool once

Let x be the seconds assigned to A. B receives the remaining H−x from the shared pool H. For work counts W_A and W_B and exclusive times a and b, the rate ratio is R(x) = W_A(b+H−x) / [W_B(a+x)]. With positive work and exclusive times, this expression decreases as x moves from zero to H. Its exact bounds therefore sit at those two endpoints. There is no need to search a grid of allocations.[3][1]

In the 22-second example, the full range is 5/6 to 7/4. Assigning 3 shared seconds to A and 1 to B gives 11 seconds each and an exact tie. The range describes allowed accounting policies. It is not a confidence interval, timing error bar or estimate of run-to-run variation.[2]

  • A receives x; B receives H−x. The sum must remain a+b+H.

Name the boundary

A second invented case is robust to this allocation choice. Keep 100 items per arm, but use 4 exclusive seconds for A, 10 for B and a 2-second shared pool. The joint total is 16 seconds. Even charging the entire pool to A leaves a ratio of 10/6, or 5/3. The other endpoint is 12/4, or 3. A has the higher attributed rate throughout this declared domain.[2]

That conclusion is conditional. The model allows any nonnegative split of one shared pool. A real ownership rule might constrain the split. Publish that rule before comparing scores. Never omit the pool, charge it twice or replace the joint total with a sum of overlapping intervals. If isolated runtime is the question, this allocation worksheet cannot answer it.[3]

  • Attributed work rates from a joint workflow are different from separately measured isolated runtimes.

Reproduce the illustration

The accompanying standard-library proof retains both scenarios, all four arm rows, exact rational endpoints and the tie. Four positive controls check the endpoints, zero overhead and work-count sensitivity; ten malformed inputs must be refused. Correctness and completion are authored declarations, not results from a kernel grader. One reviewed local standard-library invocation retained the full inputs and all fourteen passing controls. Its process duration is not a workload measurement.[3][1]

Use this worksheet to ask a narrow question: does the accounting conclusion survive every allocation you have allowed? It does not establish which method caused the overhead or how either would perform alone. No hardware was timed, no monetary cost was calculated, and no production or training improvement is claimed.[3][4]

  • For a comparison with shared overhead, retain the joint total and state who receives the charge before interpreting the score.

Sources

  1. Python 3.9 rational arithmetic docs.python.org
  2. Exact saved synthetic result data.nodus-compute.ai
  3. Original source, fixture and complete proof package data.nodus-compute.ai
  4. Source and saved-result provenance data.nodus-compute.ai
  5. Vector figure data.nodus-compute.ai