diff options
| author | eunhhu <[email protected]> | 2026-10-13 05:08:06 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-13 05:08:06 +0100 |
| commit | 41a2e5c65dc92a0c47212efcb7f5dfef8443f9b2 (patch) | |
| tree | 5c3354e41a5f15b253d333de24dd1bae4037c77b /docs/design/027-computation-core.md | |
| parent | 5a44af0308017f4e7b54a8ff6ccdc797b5d94015 (diff) | |
| download | pure-41a2e5c65dc92a0c47212efcb7f5dfef8443f9b2.tar.gz pure-41a2e5c65dc92a0c47212efcb7f5dfef8443f9b2.zip | |
Research 140, 027's stage 1 measured: SHA-256 written in aup (its examples/sha256.aup) right for FIPS 180-2's examples and 138 more messages on every path, in make check against hashlib; 52 lines against Python's 28 (the bar missed: no formatting, no bytes joined or sliced, no lists as values, moved into stage 2), 176 times C's time and 0.43 of plain Python's (1,591 ns a byte; a block's 19,129 instructions, 39% of them the inlined fn's literals not folded); 044's check, time.c against the same algorithm in C (digests compared first) and the Python reference
Diffstat (limited to 'docs/design/027-computation-core.md')
| -rw-r--r-- | docs/design/027-computation-core.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/design/027-computation-core.md b/docs/design/027-computation-core.md index 4df67f9..f26f2d5 100644 --- a/docs/design/027-computation-core.md +++ b/docs/design/027-computation-core.md @@ -3,6 +3,11 @@ 작성일: 2026-10-13. 상태: 설계와 단계. [026](026-app-contract.md)이 얼릴 계약 안에서 계산의 언어를 다시 세운다. 잴 도구는 [140](../research/140-spec-suite.md)의 명세 묶음이다. 1.0 전이라 호환은 챙기지 않는다. 사용자의 말: "진행해" (2026-10-13). +1단계를 만들었다([140](../research/140-spec-suite.md)의 뒷절). +- aup로 쓴 SHA-256이 공식 벡터를 세 실행 길에서 모두 지난다. +- 줄 수는 막대에 못 미쳤다(aup 52 대 파이썬 28). 남은 차이는 형식 지정, 바이트 잇기와 자르기, 값으로서의 리스트다. 이것들을 2단계에 더했다. +- 시간은 C의 176배, 순수 파이썬의 0.43배다. + ## 쉬운 말로 - **지금의 꼴.** aup와 Pure는 패턴마다 종류와 명령을 둔다. 커서, 인덱스, 문서, 표 보기, 메시지의 행이 각각 따로다. 그래서 세상의 @@ -129,6 +134,11 @@ - 재귀하는 fn과 `while`을 둔다. Pure에는 부르기와 돌아가기, 함수마다의 검증이 생긴다. - `for c in t`로 글자(코드 포인트)를 읽는다. - 메시지의 필드가 아무 값을 가진다. JSON의 배열과 객체가 곧 리스트와 레코드다. +- 1단계의 SHA-256이 길었던 까닭을 여기서 푼다. + - 형식 지정(`{x:08x}`, `{price:.2}`) + - 바이트 값을 잇고 자르기(`b + c`, `b[a .. c]`)와 바이트를 담는 `let` + - 값으로서의 리스트: 블록 안에서 짓고 다시 짓는다 + - fn을 펼칠 때 리터럴 인자를 접기: 구현의 일이다. 140이 블록당 명령의 39%를 fn 호출의 몫으로 쟀다 - 먼저 이벤트와 보기의 값(메모리 안)에서 한다. 상태는 3단계다. - **막대.** - JSON 파서가 JSONTestSuite의 `y_`를 모두 받고 `n_`을 모두 거절한다. `i_`는 정한 쪽을 적는다. |
