Charles KWON OhJun
279a16a88c
refactor: pure Go — recursion→iteration, COW records, zero alloc
CDX Seek iterative (cdx.go):
- Converted recursive seekPage → iterative loop
- Single buf reused across all B-tree levels (was: make per level)
- Internal node: binary search (was: linear O(n))
- Eliminates 3 heap allocations per CDX SEEK
DBF Copy-on-Write records (dbf.go):
- GoTo: recBuf = mmap slice reference (zero-copy read)
- PutValue/Delete/Recall: promote to ownBuf before write
- Eliminates memcpy per GoTo for read-only SCAN operations
- recOwned flag tracks COW state
NTX build.go:
- setKeyEntry: write directly to page (no temp make([]byte))
- padCopy: copy+fill (no pre-fill entire buffer)
CDX DecodeLeafKeys slab (cdx.go):
- Single slab allocation for all keys per page
82/82 stress PASS. All unit tests PASS.
50K SEEK random: 63ms (Harbour 67ms — FASTER!)
50K DELSCAN: 2ms (Harbour 12ms — 6x FASTER!)
CDX SCOPE: 2ms (Harbour 4ms — 2x FASTER!)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:56:20 +09:00
..
2026-04-07 22:56:20 +09:00
2026-04-07 22:56:20 +09:00
2026-04-02 22:33:59 +09:00
2026-04-07 22:44:56 +09:00
2026-04-02 22:33:59 +09:00
2026-03-31 09:41:50 +09:00
2026-03-31 09:41:50 +09:00
2026-04-02 22:33:59 +09:00
2026-03-31 09:41:50 +09:00