ParetoStack-soft 1.3.19: five samples to judge before installing
Ces pages d’exemples sont en anglais.
Each sample below ships in the release. The right-hand column is what the released product writes, with one edit: the names the product generated, and any generated comments, were replaced by neutral text (names such as _gen_1). Long generated helper blocks are replaced by a marked line. Nothing else was changed. The patches shown were produced again on 2026-11-29 from the 1.3.19 sources; the timing runs did not keep their patches. The gains come from the recorded timing runs.
These are small example programs written to show the product. They are not a prediction for your code. In the 21-sample run of this release: AWS Graviton3, 16 cores: 19 of 21 verified faster, AMD EPYC 9R14 (AWS c7a.4xlarge): 19 of 21 verified faster, Intel Xeon 8488C (AWS c7i.4xlarge): 19 of 21 verified faster, Apple A18 Pro (Mac): 19 of 21 verified faster.
How a result is accepted
The original and the changed copy are run in alternation on the same machine. A result counts only if the output passes the declared check (identical bytes, or differences within stated numeric limits) and the speed-up is at least 2 % and statistically significant (p < 0.01). The original code is not modified.
1. Word filter (Python)
acceptedoutput identicalFilters a generated word stream against an allow list and a block list held as plain Python lists. Level L2 (data layout and memory); an L1 (loop) item was selected too and leaves no visible change here. This is the largest gain of the 21 samples, not a typical one.
On a narrow screen, scroll the listing sideways: the optimized version is on the right.
| Original: main.py | Optimized by the product | ||
|---|---|---|---|
| unchanged lines not shown | |||
| 4 | import sys | 4 | import sys |
| 5 | from pathlib import Path | 5 | from pathlib import Path |
| 6 | 6 | ||
| 7 | [ 50 lines of generated helper code not shown here; they are in the real patch ] | ||
| 57 | |||
| 58 | |||
| 7 | VOCAB, ALLOWED, BLOCKED, WORDS = 6000, 1500, 400, 60000 | 59 | VOCAB, ALLOWED, BLOCKED, WORDS = 6000, 1500, 400, 60000 |
| 8 | 60 | ||
| 9 | 61 | ||
| 10 | def filter_words(words, allowed, blocked): | 62 | def filter_words(words, allowed, blocked): |
| 11 | kept = [] | 63 | kept = [] |
| 64 | _gen_1 = _gen_2(allowed) | ||
| 65 | _gen_3 = _gen_2(blocked) | ||
| 12 | for w in words: | 66 | for w in words: |
| 13 | if w in allowed and w not in blocked: | 67 | if (_gen_1(w)) and (not _gen_3(w)): |
| 14 | kept.append(w) | 68 | kept.append(w) |
| 15 | return kept | 69 | return kept |
| 16 | 70 | ||
| 17 | 71 | ||
| 18 | def unique_words(words): | 72 | def unique_words(words): |
| 19 | seen = [] | 73 | seen = [] |
| 74 | _gen_4 = _gen_5(seen) | ||
| 20 | for w in words: | 75 | for w in words: |
| 21 | if w not in seen: | 76 | if (not _gen_4.has(w)): |
| 22 | seen.append(w) | 77 | _gen_4.append(w) |
| 23 | return seen | 78 | return seen |
| 24 | 79 | ||
| 25 | 80 | ||
| unchanged lines not shown | |||
Measured gain
| Machine | Date (UTC) | Release | Python | Measured result |
|---|---|---|---|---|
| AWS Graviton3, 16 cores | 2026-11-29 | 1.3.19 | 3.12.3 | 80.69x faster |
| AMD EPYC 9R14 (AWS c7a.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 73.07x faster |
| Intel Xeon 8488C (AWS c7i.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 65.53x faster |
| Apple A18 Pro (Mac) | 2026-11-29 | 1.3.19 | 3.12.16 | 59.15x faster |
Checked by: the output JSON files compared byte for byte.
2. Matrix multiply (C++)
acceptedoutput identicalA textbook triple loop. Levels L2 (memory access order) and L1. The build script of the sample also receives a small loop change (not shown).
On a narrow screen, scroll the listing sideways: the optimized version is on the right.
| Original: main.cpp | Optimized by the product | ||
|---|---|---|---|
| unchanged lines not shown | |||
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <vector> | 7 | #include <vector> |
| 8 | 8 | ||
| 9 | [ 11 lines of generated helper code not shown here; they are in the real patch ] | ||
| 20 | |||
| 21 | |||
| 9 | static uint64_t seed = 88172645463325252ULL; | 22 | static uint64_t seed = 88172645463325252ULL; |
| 10 | static double rnd() { seed ^= seed << 13; seed ^= seed >> 7; seed ^= seed << 17; return (double)(seed % 20001) / 1000.0 - 10.0; } | 23 | static double rnd() { seed ^= seed << 13; seed ^= seed >> 7; seed ^= seed << 17; return (double)(seed % 20001) / 1000.0 - 10.0; } |
| 11 | 24 | ||
| 12 | void matmul(const double* A, const double* B, double* C, long M, long N, long K) { | 25 | void matmul(const double* A, const double* B, double* C, long M, long N, long K) { |
| 13 | for (long i = 0; i < M; ++i) { | 26 | if ((M) > 0 && (N) > 0 && (K) > 0 && (K) >= 0 && (N) >= 0 && (N) >= 0 && _gen_1(_gen_2(C, 0), _gen_2(C, ((M) - 1) * (N) + (N)), _gen_2(A, 0), _gen_2(A, ((M) - 1) * (K) + (K))) && _gen_1(_gen_2(C, 0), _gen_2(C, ((M) - 1) * (N) + (N)), _gen_2(B, 0), _gen_2(B, ((K) - 1) * (N) + (N)))) { |
| 27 | for (long i = 0; i < (M); ++i) for (long j = 0; j < (N); ++j) C[i * N + j] = 0.0; | ||
| 28 | for (long _gen_3 = 0; _gen_3 < (M); _gen_3 += 32) | ||
| 29 | for (long _gen_4 = 0; _gen_4 < (K); _gen_4 += 128) { | ||
| 30 | long _gen_5 = _gen_3 + 32 < (M) ? _gen_3 + 32 : (M); long _gen_6 = _gen_4 + 128 < (K) ? _gen_4 + 128 : (K); | ||
| 31 | for (long i = _gen_3; i < _gen_5; ++i) | ||
| 32 | for (long k = _gen_4; k < _gen_6; ++k) { | ||
| 33 | const double _gen_7 = A[i * K + k]; | ||
| 34 | for (long j = 0; j < (N); ++j) C[i * N + j] += _gen_7 * B[k * N + j]; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | } else { | ||
| 38 | for (long i = 0; i < M; ++i) { | ||
| 14 | for (long j = 0; j < N; ++j) { | 39 | for (long j = 0; j < N; ++j) { |
| 15 | double sum = 0.0; | 40 | double sum = 0.0; |
| 16 | for (long k = 0; k < K; ++k) { | 41 | for (long k = 0; k < K; ++k) { |
| unchanged lines not shown | |||
| 18 | } | 43 | } |
| 19 | C[i * N + j] = sum; | 44 | C[i * N + j] = sum; |
| 20 | } | 45 | } |
| 46 | } | ||
| 21 | } | 47 | } |
| 22 | } | 48 | } |
| 23 | 49 | ||
| unchanged lines not shown | |||
Measured gain (computation time; compilation not counted)
| Machine | Date (UTC) | Release | Python | Measured result |
|---|---|---|---|---|
| AWS Graviton3, 16 cores | 2026-11-29 | 1.3.19 | 3.12.3 | 4.34x faster |
| AMD EPYC 9R14 (AWS c7a.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 4.44x faster |
| Intel Xeon 8488C (AWS c7i.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 2.71x faster |
| Apple A18 Pro (Mac) | 2026-11-29 | 1.3.19 | 3.12.16 | 5.14x faster |
Checked by: the result arrays compared byte for byte. Whether floating-point C or C++ stays identical after such a change depends on compiler settings; a difference would be reported as a failed check.
3. FIR filter (Python, tolerance contract)
acceptedjudged by toleranceA direct double-loop convolution. Levels L3 (algorithm change) and L4 (a port of the loop to C), plus L1. The kept change holds both: the compiled path is tried first and the other paths are fallbacks, so which one runs depends on the machine. The compiled path needs a C compiler: at first use the optimized program compiles it and saves the library on disk.
On a narrow screen, scroll the listing sideways: the optimized version is on the right.
| Original: main.py | Optimized by the product | ||
|---|---|---|---|
| 1 | """FIR filtering written the textbook way: a double loop that adds every input sample times every filter tap into the output (a direct convolution). A long signal and a long filter make it O(n*m); | 1 | """FIR filtering written the textbook way: a double loop that adds every input sample times every filter tap into the output (a direct convolution). A long signal and a long filter make it O(n*m); |
| 2 | the same result is an FFT away. FFT rounding differs from the direct sum in the last digits, so the output is judged by a tolerance, not byte for byte. NumPy only.""" | 2 | the same result is an FFT away. FFT rounding differs from the direct sum in the last digits, so the output is judged by a tolerance, not byte for byte. NumPy only.""" |
| 3 | [ 58 lines of generated helper code not shown here; they are in the real patch ] | ||
| 3 | import sys | 61 | import sys |
| 4 | from pathlib import Path | 62 | from pathlib import Path |
| 5 | 63 | ||
| unchanged lines not shown | |||
| 8 | 66 | ||
| 9 | def fir(signal, taps): | 67 | def fir(signal, taps): |
| 10 | out = np.zeros(len(signal) + len(taps) - 1) | 68 | out = np.zeros(len(signal) + len(taps) - 1) |
| 11 | for i in range(len(signal)): | 69 | if _gen_1(out, signal, taps, len(signal), len(taps)): |
| 12 | for j in range(len(taps)): | 70 | _gen_2(out, signal, taps, len(signal), len(taps)) |
| 13 | out[i + j] += signal[i] * taps[j] | 71 | else: |
| 72 | _gen_3 = range | ||
| 73 | _gen_4 = len | ||
| 74 | for i in range(len(signal)): | ||
| 75 | for j in _gen_3(_gen_4(taps)): | ||
| 76 | out[i + j] += signal[i] * taps[j] | ||
| 14 | return out | 77 | return out |
| 15 | 78 | ||
| 16 | 79 | ||
| unchanged lines not shown | |||
| 19 | t = np.arange(12000) | 82 | t = np.arange(12000) |
| 20 | signal = np.sin(2 * np.pi * t / 97.0) + 0.5 * np.sin(2 * np.pi * t / 13.0) + 0.2 * rng.randn(t.size) | 83 | signal = np.sin(2 * np.pi * t / 97.0) + 0.5 * np.sin(2 * np.pi * t / 13.0) + 0.2 * rng.randn(t.size) |
| 21 | results = [] | 84 | results = [] |
| 85 | _gen_5 = np.arange | ||
| 86 | _gen_6 = np.sinc | ||
| 87 | _gen_7 = np.hamming | ||
| 88 | _gen_8 = results.append | ||
| 89 | _gen_9 = fir | ||
| 22 | for n_taps, cutoff in ((301, 0.05), (257, 0.12), (201, 0.2)): | 90 | for n_taps, cutoff in ((301, 0.05), (257, 0.12), (201, 0.2)): |
| 23 | k = np.arange(n_taps) - n_taps // 2 | 91 | k = _gen_5(n_taps) - n_taps // 2 |
| 24 | taps = np.sinc(2 * cutoff * k) * np.hamming(n_taps) * 2 * cutoff # a windowed-sinc low-pass | 92 | taps = _gen_6(2 * cutoff * k) * _gen_7(n_taps) * 2 * cutoff # a windowed-sinc low-pass |
| 25 | results.append(fir(signal, taps)) | 93 | _gen_8(_gen_9(signal, taps)) |
| 26 | out = Path(out_dir) | 94 | out = Path(out_dir) |
| 95 | _gen_10 = np.save | ||
| 27 | for i, r in enumerate(results): | 96 | for i, r in enumerate(results): |
| 28 | np.save(out / f"filtered_{i}.npy", r) | 97 | _gen_10(out / f"filtered_{i}.npy", r) |
| 29 | 98 | ||
| 30 | 99 | ||
| 31 | if __name__ == "__main__": | 100 | if __name__ == "__main__": |
| unchanged lines not shown | |||
Measured gain
| Machine | Date (UTC) | Release | Python | Measured result |
|---|---|---|---|---|
| AWS Graviton3, 16 cores | 2026-11-29 | 1.3.19 | 3.12.3 | 35.66x faster |
| AMD EPYC 9R14 (AWS c7a.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 26.84x faster |
| Intel Xeon 8488C (AWS c7i.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | 20.65x faster |
| Apple A18 Pro (Mac) | 2026-11-29 | 1.3.19 | 3.12.16 | 24.05x faster |
Checked by: every output value within an absolute difference of 0.000001 of the original (the limit written in the sample). The records report "accuracy kept (1-max_rel = 1.0000)".
4. Rejected: a faster copy that gives other numbers
rejectedA ledger calculation that looks like an ordinary matrix product. Each row holds very large amounts and their exact reversals next to ordinary ones, so the result depends on the order of the additions. A tuned library adds in another order. The sample asks for agreement to about 12 digits (relative 1e-12, absolute 1e-6). This sample was written so that the change should be refused.
On a narrow screen, scroll the listing sideways: the optimized version is on the right.
| Original: main.py | Optimized by the product | ||
|---|---|---|---|
| unchanged lines not shown | |||
| 2 | faster, but the amounts hold very large entries that cancel each other (1e16 and -1e16 next to ordinary values), so the result depends on the order in which the terms are | 2 | faster, but the amounts hold very large entries that cancel each other (1e16 and -1e16 next to ordinary values), so the result depends on the order in which the terms are |
| 3 | added: adding 1e16, then 1.0, then -1e16 gives 0.0, while 1e16 - 1e16 + 1.0 gives 1.0. The loop adds them in a fixed order and the downstream check compares against totals made | 3 | added: adding 1e16, then 1.0, then -1e16 gives 0.0, while 1e16 - 1e16 + 1.0 gives 1.0. The loop adds them in a fixed order and the downstream check compares against totals made |
| 4 | that way, to 12 digits. A library adds them in another order (blocks, several running sums), which gives other numbers here. The correct outcome is that the swap is rejected.""" | 4 | that way, to 12 digits. A library adds them in another order (blocks, several running sums), which gives other numbers here. The correct outcome is that the swap is rejected.""" |
| 5 | [ 16 lines of generated helper code not shown here; they are in the real patch ] | ||
| 5 | import sys | 21 | import sys |
| 6 | from pathlib import Path | 22 | from pathlib import Path |
| 7 | 23 | ||
| unchanged lines not shown | |||
| 14 | n, p = a.shape | 30 | n, p = a.shape |
| 15 | m = b.shape[1] | 31 | m = b.shape[1] |
| 16 | c = np.zeros((n, m)) | 32 | c = np.zeros((n, m)) |
| 17 | for i in range(n): | 33 | if _gen_1(c, a, b, n, m, p): |
| 18 | for j in range(m): | 34 | _gen_2(c, a, b, n, m, p) |
| 19 | for k in range(p): | 35 | else: |
| 20 | c[i][j] += a[i][k] * b[k][j] | 36 | _gen_3 = range |
| 37 | for i in range(n): | ||
| 38 | for j in _gen_3(m): | ||
| 39 | for k in _gen_3(p): | ||
| 40 | c[i][j] += a[i][k] * b[k][j] | ||
| 21 | return c | 41 | return c |
| 22 | 42 | ||
| 23 | 43 | ||
| unchanged lines not shown | |||
The verifier's recorded reason
fail_accuracy: accuracy contract not met on totals.npy (absolute and relative limits both exceeded)
Run again with release 1.3.19 on 2026-11-29 (an Arm computer): same verdict. 30,940 of 31,200 values were outside the limits; the largest absolute difference was 77.5 (for example -2516.5 became -2439.0).
Recorded runs of an earlier release:
| Machine | Date (UTC) | Release | Verdict |
|---|---|---|---|
| AWS Graviton3 | 2026-11-23 | 1.3.12 | rejected: accuracy contract not met on totals.npy (the rejected copy ran 34.2x faster) |
| AWS Graviton5 | 2026-11-23 | 1.3.12 | rejected: accuracy contract not met on totals.npy (the rejected copy ran 27.5x faster) |
| AMD Ryzen 9 7950X (Windows PC, Linux subsystem) | 2026-11-23 | 1.3.12 | rejected: accuracy contract not met on totals.npy (the rejected copy ran 5.7x faster) |
| Apple A18 Pro | 2026-11-23 | 1.3.12 | rejected: accuracy contract not met on totals.npy (the rejected copy ran 22.3x faster) |
The speed of a rejected copy is not a result.
5. No gain: correct output, not faster
not accepted: no gainoutput identicalWord and word-pair counts over generated text. The product found only small loop-level changes (L1).
On a narrow screen, scroll the listing sideways: the optimized version is on the right.
| Original: main.py | Optimized by the product | ||
|---|---|---|---|
| unchanged lines not shown | |||
| 13 | def make_corpus(n_sentences, seed): | 13 | def make_corpus(n_sentences, seed): |
| 14 | rng = random.Random(seed) | 14 | rng = random.Random(seed) |
| 15 | sentences = [] | 15 | sentences = [] |
| 16 | _gen_1 = range | ||
| 16 | for _ in range(n_sentences): | 17 | for _ in range(n_sentences): |
| 17 | words = [] | 18 | words = [] |
| 18 | for _ in range(rng.randint(6, 16)): | 19 | for _ in _gen_1(rng.randint(6, 16)): |
| 19 | words.append(rng.choice(FILLER) if rng.random() < 0.3 else rng.choice(VOCAB)) | 20 | words.append(rng.choice(FILLER) if rng.random() < 0.3 else rng.choice(VOCAB)) |
| 20 | sentences.append(" ".join(words)) | 21 | sentences.append(" ".join(words)) |
| 21 | return sentences | 22 | return sentences |
| unchanged lines not shown | |||
| 27 | 28 | ||
| 28 | def tokenize(sentence): | 29 | def tokenize(sentence): |
| 29 | tokens = [] | 30 | tokens = [] |
| 31 | _gen_2 = len | ||
| 30 | for raw in sentence.split(" "): | 32 | for raw in sentence.split(" "): |
| 31 | w = raw.strip().lower() | 33 | w = raw.strip().lower() |
| 32 | if len(w) > 0: | 34 | if _gen_2(w) > 0: |
| 33 | tokens.append(w) | 35 | tokens.append(w) |
| 34 | return tokens | 36 | return tokens |
| 35 | 37 | ||
| 36 | 38 | ||
| 37 | def count_words(sentences): | 39 | def count_words(sentences): |
| 38 | counts = {} | 40 | counts = {} |
| 41 | _gen_3 = tokenize | ||
| 42 | _gen_4 = is_stop | ||
| 39 | for s in sentences: | 43 | for s in sentences: |
| 40 | for w in tokenize(s): | 44 | for w in _gen_3(s): |
| 41 | if not is_stop(w): | 45 | if not _gen_4(w): |
| 42 | counts[w] = counts.get(w, 0) + 1 | 46 | counts[w] = counts.get(w, 0) + 1 |
| 43 | return counts | 47 | return counts |
| 44 | 48 | ||
| 45 | 49 | ||
| 46 | def count_bigrams(sentences): | 50 | def count_bigrams(sentences): |
| 47 | counts = {} | 51 | counts = {} |
| 52 | _gen_3 = tokenize | ||
| 53 | _gen_1 = range | ||
| 54 | _gen_2 = len | ||
| 55 | _gen_4 = is_stop | ||
| 48 | for s in sentences: | 56 | for s in sentences: |
| 49 | toks = tokenize(s) | 57 | toks = _gen_3(s) |
| 50 | for i in range(len(toks) - 1): | 58 | for i in _gen_1(_gen_2(toks) - 1): |
| 51 | a, b = toks[i], toks[i + 1] | 59 | a, b = toks[i], toks[i + 1] |
| 52 | if not is_stop(a) and not is_stop(b): | 60 | if not _gen_4(a) and not _gen_4(b): |
| 53 | key = a + " " + b | 61 | key = a + " " + b |
| 54 | counts[key] = counts.get(key, 0) + 1 | 62 | counts[key] = counts.get(key, 0) + 1 |
| 55 | return counts | 63 | return counts |
| unchanged lines not shown | |||
| 57 | 65 | ||
| 58 | def length_histogram(sentences): | 66 | def length_histogram(sentences): |
| 59 | hist = {} | 67 | hist = {} |
| 68 | _gen_2 = len | ||
| 69 | _gen_3 = tokenize | ||
| 60 | for s in sentences: | 70 | for s in sentences: |
| 61 | n = len(tokenize(s)) | 71 | n = _gen_2(_gen_3(s)) |
| 62 | hist[n] = hist.get(n, 0) + 1 | 72 | hist[n] = hist.get(n, 0) + 1 |
| 63 | return hist | 73 | return hist |
| 64 | 74 | ||
| unchanged lines not shown | |||
Measured
| Machine | Date (UTC) | Release | Python | Measured result |
|---|---|---|---|---|
| AWS Graviton3, 16 cores | 2026-11-29 | 1.3.19 | 3.12.3 | no gain (ratio 1.002x) |
| AMD EPYC 9R14 (AWS c7a.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | no gain (ratio 1.003x) |
| Intel Xeon 8488C (AWS c7i.4xlarge) | 2026-11-29 | 1.3.19 | 3.12.3 | no gain (ratio 1.003x) |
| Apple A18 Pro (Mac) | 2026-11-29 | 1.3.19 | 3.12.16 | no gain (ratio 1.006x) |
The recorded reason (Graviton3): "identical output but the speed-up (1.002x, p=0.180) is not significant (needs >= 2 % and p < 0.01)".