Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,19 @@ Deep details live in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) and [docs/WORK

## Performance

Same 4-stage pipeline (drop nulls → dual filter → group-by aggregates → fill + count), executed by pandas 3.0.5 and Xazz on real Seoul air-quality data (8 source files, 2008–2026). Median of 3 runs after warmup, wall-clock timing.
Same 4-stage pipeline (drop nulls → dual filter → group-by aggregates → fill + count), executed by pandas 3.0.6 and Xazz on real Seoul air-quality data (8 source files, 2008–2026). Median of 3 runs after warmup; each engine reports its own internal pipeline time.

<div align="center">
<img src="docs/assets/benchmark_chart.png" alt="Benchmark: latency scaling across 228K/912K/4.09M rows and speedup bars — 0.76x, 1.44x, 1.30x vs pandas" width="94%">
<img src="docs/assets/benchmark_chart.png" alt="Benchmark: latency scaling across 228K/912K/4.09M rows and speedup bars — 2.04x, 3.84x, 2.14x vs pandas" width="94%">
</div>

- **Faster past the small file**: 1.44× vs pandas at 912K rows (467 ms vs 671 ms) and 1.30× at 4.09M rows (3,070 ms vs 3,981 ms) — with lower peak RSS at the largest scale (567 MB vs 656 MB). At 228K rows the two engines are roughly break-even (0.76×): the fixed load/filter overhead dominates a file pandas already reads in ~0.2 s.
- **Faster at every scale**: 2.04× vs pandas at 228K rows (76 ms vs 155 ms), 3.84× at 912K rows (143 ms vs 548 ms) and 2.14× at 4.09M rows (1,148 ms vs 2,457 ms) — with lower peak RSS at every scale (405 MB vs 635 MB at 4.09M rows). The gap is widest at 912K rows and narrows again at 4.09M rows.
- Both sides are measured as **pipeline execution only** — the Python interpreter boot (~0.3–0.7 s) is excluded from pandas, and Xazz reports its own `[xazz:timing]` pipeline marker, so the comparison is apples-to-apples. Peak RSS uses the process tree for both engines.
- Source comes from Apache Arrow columnar memory + Polars LazyFrame query optimization + multithreaded native execution.
- **Out-of-core execution:** `load()` now returns a lazy scan (`scan_csv`/`scan_parquet`/`scan_ipc`), so sources stay on disk until the terminal collect — no full-file materialization upfront. For very large workloads set `XAZZ_STREAMING=1` to collect through Polars' streaming engine (unsupported plans fall back to in-memory automatically). See [docs/ROADMAP.md](docs/ROADMAP.md) Track A2.
- Honest footnote: Polars' multithreading trades higher peak RSS for latency — pandas holds more rows per thread, Polars parallelizes across them. Note the benchmark data itself is not committed (it is built from the Seoul air-quality sources).

**Measurement provenance.** The committed numbers were captured on a single development host and **predate provenance capture**, so the full CPU/OS/RAM spec is not recorded — read them as directional. `benches/run_readme_benchmark.py` now writes a `provenance` block (platform, OS, CPU model, physical/logical cores, total RAM, and the pandas/polars/Python versions) into `benches/benchmark_results.json`, so the next run on a stable host is fully attributed. Reproduce it yourself:
**Measurement provenance.** Measured 2026-10-13 on one Windows 11 host: Intel Core Ultra 9 185H (16 physical / 22 logical cores), 63.5 GiB RAM, Python 3.12.12, pandas 3.0.6, NumPy 2.5.3, release build of commit `f1e55cb`. The host spec, library versions, binary SHA-256s and input-file hashes are recorded in the `provenance` block of `benches/benchmark_results.json`, and `benches/results/windows-cpu-readme-2026-10-13.verification.json` is an independent row-by-row re-check of the same run. These figures replace the earlier 0.76×/1.44×/1.30× numbers, which came from a different, unrecorded host and an older runtime (before `load()` became a lazy scan); the input data and pipeline are unchanged. Reproduce it yourself:

```bash
git lfs pull # fetch examples/data (Git LFS)
Expand Down Expand Up @@ -348,7 +348,7 @@ Xazz is pre-1.0. We would rather state what is **not** verified than let you dis
- **No native Python extension yet.** `import xazz` is a pure-Python adapter over the CLI, not a PyO3 module — it returns the same diagnostics as the CLI but pays a subprocess boundary. The PyO3 path and the NumPy/Pandas → Arrow handoff are deferred. See [docs/ROADMAP.md](docs/ROADMAP.md) Track C4.
- **`xazz emit rust` is a reference emitter, not a second runtime.** New language features land in `xazz-exec` first; the emitted Rust can lag on some training options (e.g. single-run `validation_split` / early stopping, per-epoch sweep columns). `xazz run` is the source of truth — treat the emitted code as readable reference output.
- **The container image and clean-host smoke are pending the next tag.** The `Dockerfile` and `docker compose up` demo work from a local build, but the GHCR multi-arch image is published only on a `v*` tag, and the [clean-host smoke checklist](docs/DOCKER.md#smoke-checklist-clean-host) has not been recorded against a published tag yet.
- **Benchmarks are single-host and not yet provenance-stamped.** The numbers in [Performance](#performance) come from one development host and predate provenance capture — treat them as directional, not as a guarantee. `benches/run_readme_benchmark.py` now records host/OS/CPU/RAM/versions so the next run is reproducible.
- **Benchmarks are single-host.** The numbers in [Performance](#performance) are provenance-stamped but come from one Windows laptop; they have not been reproduced on a second host or on Linux/macOS yet, so read the ratios as representative, not as a guarantee.
- **Not a sandbox.** `xazz-runner` is process isolation with an execution timeout, not an OS-level sandbox. Policy-as-Code blocks known-bad pipeline shapes before execution; see [docs/SECURITY_GUARDRAIL.md](docs/SECURITY_GUARDRAIL.md) for the `PATH`-shadowing deployment caveat.

**Non-goals:** replacing pandas / Polars / DuckDB as compute engines, replacing PyTorch as a training framework, or competing on GPU kernel performance. Xazz is the compile-and-governance layer *above* those engines.
Expand Down
10 changes: 5 additions & 5 deletions README_kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,19 @@ Xazz는 모듈화된 Rust 워크스페이스입니다. CLI는 2–5 MB 경량

## 성능

동일한 4단계 파이프라인(널 제거 → 이중 필터 → 그룹 집계 → fill + count)을 실제 서울시 공기질 데이터(2008–2026, 원본 8개 파일)에 대해 pandas 3.0.5와 Xazz로 실행했습니다. 워밍업 1회 후 3회 측정의 중앙값, wall-clock 기준입니다.
동일한 4단계 파이프라인(널 제거 → 이중 필터 → 그룹 집계 → fill + count)을 실제 서울시 공기질 데이터(2008–2026, 원본 8개 파일)에 대해 pandas 3.0.6과 Xazz로 실행했습니다. 워밍업 1회 후 3회 측정의 중앙값이며, 각 엔진이 보고하는 내부 파이프라인 시간 기준입니다.

<div align="center">
<img src="docs/assets/benchmark_chart.png" alt="벤치마크: 228K/912K/409만 행에서의 지연 시간 스케일링과 속도 향상 — pandas 대비 0.76배, 1.44배, 1.30배" width="94%">
<img src="docs/assets/benchmark_chart.png" alt="벤치마크: 228K/912K/409만 행에서의 지연 시간 스케일링과 속도 향상 — pandas 대비 2.04배, 3.84배, 2.14배" width="94%">
</div>

- **작은 파일 이후로 더 빠름**: 912K 행에서 pandas 대비 1.44배(467 ms vs 671 ms), 409만 행에서 1.30배(3,070 ms vs 3,981 ms) — 최대 구간에서 피크 RSS도 더 낮습니다(567 MB vs 656 MB). 228K 행에서는 두 엔진이 대략 동등합니다(0.76배): 이 규모에서는 파일 로드·필터의 고정 오버헤드가 지배적이며 pandas도 약 0.2초면 읽습니다.
- **모든 규모에서 더 빠름**: 228K 행에서 pandas 대비 2.04배(76 ms vs 155 ms), 912K 행에서 3.84배(143 ms vs 548 ms), 409만 행에서 2.14배(1,148 ms vs 2,457 ms) — 모든 규모에서 피크 RSS도 더 낮습니다(409만 행 기준 405 MB vs 635 MB). 격차는 912K 행에서 가장 크고 409만 행에서 다시 좁혀집니다.
- 양쪽 모두 **파이프라인 실행 시간만** 측정합니다 — Python 인터프리터 부팅(~0.3–0.7초)은 pandas에서 제외하고, Xazz는 자체 `[xazz:timing]` 파이프라인 마커를 보고하므로 공정한 비교입니다. 피크 RSS는 두 엔진 모두 프로세스 트리 기준으로 측정합니다.
- 성능의 원천은 Apache Arrow 컬럼형 메모리 + Polars LazyFrame 쿼리 최적화 + 멀티스레드 네이티브 실행입니다.
- **Out-of-core 실행:** `load()`가 이제 lazy 스캔(`scan_csv`/`scan_parquet`/`scan_ipc`)을 반환하므로, 소스는 최종 collect 전까지 디스크에 남아 있습니다 — 앞단에서 파일 전체를 메모리에 올리지 않습니다. 매우 큰 워크로드에서는 `XAZZ_STREAMING=1`을 설정해 Polars 스트리밍 엔진으로 collect하세요(미지원 플랜은 자동으로 인메모리로 폴백). [docs/ROADMAP.md](docs/ROADMAP.md) Track A2 참고.
- 정직한 주석: Polars의 멀티스레딩은 지연 시간을 줄이는 대신 더 높은 피크 RSS를 치른다는 트레이드오프가 있습니다. 벤치마크 데이터 자체는 커밋되어 있지 않습니다(서울시 공기질 원본에서 생성).

**측정 프로비넌스.** 커밋된 수치는 개발 호스트 한 대에서 측정되었고 **프로비넌스 캡처 이전** 값이라 전체 CPU/OS/RAM 사양이 기록되어 있지 않습니다 — 방향성 지표로 보세요. 이제 `benches/run_readme_benchmark.py`가 `benches/benchmark_results.json`에 `provenance` 블록(플랫폼, OS, CPU 모델, 물리/논리 코어 수, 총 RAM, pandas/polars/Python 버전)을 기록하므로, 안정된 호스트에서 다음 실행을 하면 완전히 귀속된 수치가 됩니다. 직접 재현해 볼 수 있습니다:
**측정 프로비넌스.** 2026-10-13에 Windows 11 호스트 한 대에서 측정했습니다: Intel Core Ultra 9 185H(물리 16 / 논리 22코어), RAM 63.5 GiB, Python 3.12.12, pandas 3.0.6, NumPy 2.5.3, 커밋 `f1e55cb`의 release 빌드. 호스트 사양·라이브러리 버전·바이너리 SHA-256·입력 파일 해시는 `benches/benchmark_results.json`의 `provenance` 블록에 기록돼 있고, `benches/results/windows-cpu-readme-2026-10-13.verification.json`은 같은 실행을 행 단위로 다시 대조한 독립 검증 보고서입니다. 이 수치는 이전의 0.76배/1.44배/1.30배를 대체합니다. 이전 값은 사양이 기록되지 않은 다른 호스트에서 `load()`가 lazy 스캔이 되기 전 런타임으로 측정한 것이며, 입력 데이터와 파이프라인은 같습니다. 직접 재현해 볼 수 있습니다:

```bash
git lfs pull # examples/data 가져오기 (Git LFS)
Expand Down Expand Up @@ -342,7 +342,7 @@ Xazz는 pre-1.0입니다. 설치한 뒤에 알게 되는 것보다, **검증되
- **네이티브 Python 확장은 아직 없습니다.** `import xazz`는 CLI 위의 순수 Python 어댑터이며 PyO3 모듈이 아닙니다 — CLI와 동일한 진단을 돌려주지만 서브프로세스 경계 비용을 지불합니다. PyO3 경로와 NumPy/Pandas → Arrow 핸드오프는 보류 상태입니다. [docs/ROADMAP.md](docs/ROADMAP.md) Track C4 참고.
- **`xazz emit rust`는 참조용 emitter이며 두 번째 런타임이 아닙니다.** 신규 기능은 `xazz-exec`에 먼저 들어가고, 생성된 Rust는 일부 학습 옵션(예: 단일 실행 `validation_split`/조기 종료, 스윕의 per-epoch 열)에서 뒤처질 수 있습니다. 정본은 `xazz run`이며, emit 결과는 읽기 좋은 참조 코드로 취급하세요.
- **컨테이너 이미지·클린 호스트 스모크는 다음 태그 대기 중입니다.** `Dockerfile`과 `docker compose up` 데모는 로컬 빌드로 동작하지만, GHCR 멀티아키 이미지는 `v*` 태그에서만 게시되며, [클린 호스트 스모크 체크리스트](docs/DOCKER.md#smoke-checklist-clean-host)는 아직 게시된 태그에 대해 기록되지 않았습니다.
- **벤치마크는 단일 호스트 측정이며 프로비넌스가 아직 기록되지 않았습니다.** [성능](#성능) 섹션의 수치는 개발 호스트 한 대에서 나온 것이고 프로비넌스 캡처 이전 값입니다 — 보장이 아니라 방향성 지표로 보세요. 이제 `benches/run_readme_benchmark.py`가 호스트/OS/CPU/RAM/버전을 기록하므로 다음 실행은 재현 가능합니다.
- **벤치마크는 단일 호스트 측정입니다.** [성능](#성능) 섹션의 수치는 프로비넌스가 기록돼 있지만 Windows 노트북 한 대에서 나온 값입니다. 아직 두 번째 호스트나 Linux/macOS에서 재현하지 않았으므로 비율은 대표값으로 보고 보장으로 읽지 마세요.
- **샌드박스가 아닙니다.** `xazz-runner`는 실행 타임아웃을 동반한 프로세스 격리이지 OS 수준 샌드박스가 아닙니다. Policy-as-Code는 실행 전에 알려진 위험 파이프라인 형태를 차단하며, `PATH` 섀도잉 배포 주의사항은 [docs/SECURITY_GUARDRAIL.md](docs/SECURITY_GUARDRAIL.md)를 참고하세요.

**비목표:** pandas / Polars / DuckDB를 연산 엔진으로 대체하거나, PyTorch를 학습 프레임워크로 대체하거나, GPU 커널 성능으로 경쟁하는 것이 아닙니다. Xazz는 그 엔진들 *위의* 컴파일·거버넌스 계층입니다.
Expand Down
Loading
Loading