aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design/027-computation-core.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 02:07:33 +0100
committereunhhu <[email protected]>2026-10-19 02:07:33 +0100
commit81be688cc6fdfa52633b936a9b8793782b6f5acf (patch)
tree7fcb4175442a4c9c89dadd5deba41642feda2f31 /docs/design/027-computation-core.md
parent8339bb48cc1176543c1abf870db5666cc97e73cd (diff)
downloadpure-81be688cc6fdfa52633b936a9b8793782b6f5acf.tar.gz
pure-81be688cc6fdfa52633b936a9b8793782b6f5acf.zip
027's stage 5 closed: two numbers (number, binary64, the default of literals and of counts; i64 the exact integers, bits and money), / a number's division and // the floored quotient (FLOORDIV, 95 opcodes now 96), an i64 sum exact, money i64 minor units shown by .Nd, a replace and stored values moved when exact; the bar: TPC-C's money and rates integers in Pure and SQLite alike, every row of every table exactly the same after 20,000 transactions; core 22,766 lines to 22,791, serve.c 5,058 as it was, aup's compile.c 5,720 to 5,726; counts: b45 against stage 4's end (b42) within 0.04% on all five works; the bank's queries (s42 and s45 in turns, six each) per_branch -0.58%, in_credit +0.56%, ranks +0.20%, the rest within 0.01%, the seven answers the same bytes; TPC-C in RAM (W=1, 64 terminals, 20 s, in turns, three each): s42 on its own app (money numbers) 46,092 transactions a second, s42 on stage 5's (money i64) 47,303, s45 on it 47,287: the runtime the same (-0.03%), the app 2.6% faster with i64 money (the server's CPU a transaction 42.3 to 39.6-39.8 us, not taken apart), new-order p99 3,584 to 3,456 us; 027's status: the five stages made; CHECKPOINT's direction row through stage 5
Diffstat (limited to 'docs/design/027-computation-core.md')
-rw-r--r--docs/design/027-computation-core.md17
1 files changed, 15 insertions, 2 deletions
diff --git a/docs/design/027-computation-core.md b/docs/design/027-computation-core.md
index 06e48ec..023f277 100644
--- a/docs/design/027-computation-core.md
+++ b/docs/design/027-computation-core.md
@@ -1,6 +1,6 @@
# 027 — 계산의 핵: 상태는 값 하나, 값은 몇 가지로 짓는다
-작성일: 2026-10-13. 상태: 설계와 단계. [026](026-app-contract.md)이 얼릴 계약 안에서 계산의 언어를 다시 세운다. 잴 도구는
+작성일: 2026-10-13. 상태: 다섯 단계를 모두 만들었다(5단계의 마감, 2026-10-19). [026](026-app-contract.md)이 얼릴 계약 안에서 계산의 언어를 다시 세운다. 잴 도구는
[140](../research/140-spec-suite.md)의 명세 묶음이다. 1.0 전이라 호환은 챙기지 않는다. 사용자의 말: "진행해" (2026-10-13).
1단계를 만들었다([140](../research/140-spec-suite.md)의 뒷절).
@@ -28,7 +28,7 @@
- 140의 탐침
- 지금의 구현: 값의 칸 `Slot`, 열로 담은 B+트리 `PureList`, aup의 타입 여덟
- 선행 기술: 아래 "선행" 절
-- **다음 결정.** 1단계를 만든다.
+- **다음 결정.** 다섯 단계를 만들었다(아래 단계마다의 기록과 마감).
## 핵
@@ -569,6 +569,19 @@
저장소에서의 두 번의 시작(옮긴 뒤 옮긴 대로 저장된 것)이 같고, 이전 모듈로 되돌아가면 false는 i64의 0이다.
- 008: 교체와 시작의 규칙에 i64, `values`와 리스트 이미지의 i64 칸(2의 보수, 리틀 엔디언 8바이트).
- 명령 수: Pure의 코드가 그대로라 세지 않았다.
+- **5단계의 마감(2026-10-19).**
+ - 수는 둘이다. number(binary64)는 리터럴과 셈의 기본이고, i64는 정확한 정수와 비트와 돈이다. `/`는 number의 나눗셈이고 `//`는
+ 내림한 몫이다(명령 FLOORDIV, 95 → 96). i64의 합은 정확하고 결과만 범위를 본다. 돈은 i64의 최소 단위이고 `.Nd`로 보인다. 교체와
+ 저장된 값은 정확할 때만 옮긴다.
+ - 막대: TPC-C가 SQLite와 행마다 같은 상태를 남긴다. 돈이 양쪽에서 정수라 이제 오차 없이 같다(2만 트랜잭션, 묶은 SQLite도).
+ - 줄 수: 코어 22,766 → 22,791, serve.c 5,058 그대로, aup의 compile.c 5,720 → 5,726.
+ - 명령 수(b45 대 4단계 끝의 b42): 다섯 일 모두 ±0.04% 안이다(실행기만의 BFS −0.03%). 은행 질의(s42와 s45를 한 번에 번갈아 여섯
+ 번의 중앙값)는 per_branch −0.58%, in_credit +0.56%, ranks +0.20%, 나머지 ±0.01% 안이고(두 빌드의 여섯 번이 서로 겹친다), 일곱
+ 질의의 답은 바이트까지 같다.
+ - TPC-C(메모리, W=1, 64 터미널, 20초, 번갈아 세 번씩의 중앙값): 4단계 끝(s42)의 제 앱(돈이 number, 7e1b3dc의 벤치마크) 초당
+ 46,092, 같은 빌드의 5단계 앱(돈이 i64) 47,303, 5단계 끝(s45)의 그 앱 47,287. 런타임은 같고(−0.03%), 앱이 i64의 돈으로 2.6%
+ 빠르다. 서버의 트랜잭션당 CPU가 42.3에서 39.6–39.8 µs로 준다. 까닭은 가르지 않았다(JSON의 소수 금액은 이미 Clinger의 빠른
+ 길로 읽으므로 그것만은 아니다). new-order p99는 3,584 → 3,456 µs다.
**순서의 까닭.**
- 1과 2가 묶음의 명세 대부분을 연다. 가장 값이 크다.