~bigbes/tarantool

tarantool-protobuf

ref: 6e89cf9978343e9c7ead0bad1afcda886b18a3b6 tarantool-protobuf/.beads/interactions.jsonl -rw-r--r-- 7.3 KiB
6e89cf99 — Eugene Blikh docs: C acceleration architecture note (pf6 deliverable) 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{"id":"int-d87d903e","kind":"field_change","created_at":"2026-05-17T16:02:53.689213Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-0an","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Profiled against starwing and local focused probes. No fatal JIT abort found; cliff attributed mainly to repeated Lua tag/field dispatch plus LEN/string slicing/validation. Follow-up fast-path work captured in tarantool-protobuf-4kj and existing decoder tasks."}}
{"id":"int-d082b422","kind":"field_change","created_at":"2026-05-17T18:33:47.885977Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-8k2","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Removed PLAN.md and retargeted remaining references to Beads or concrete docs."}}
{"id":"int-d0cc1990","kind":"field_change","created_at":"2026-05-17T18:42:25.641872Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-2nl","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Removed the local .git/info/exclude rule that hid .beads/ from Git. Portable .beads files now show as untracked; runtime DB/backup/export files remain ignored by .beads/.gitignore."}}
{"id":"int-d85218d3","kind":"field_change","created_at":"2026-05-18T16:58:51.156024Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-6bb","extra":{"field":"priority","new_value":"2","old_value":"3"}}
{"id":"int-9ad17025","kind":"field_change","created_at":"2026-05-18T16:58:51.940074Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-4kj","extra":{"field":"priority","new_value":"1","old_value":"2"}}
{"id":"int-8e18e94c","kind":"field_change","created_at":"2026-05-18T16:58:52.354976Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-gcy","extra":{"field":"priority","new_value":"1","old_value":"2"}}
{"id":"int-5b6f4c8d","kind":"field_change","created_at":"2026-05-18T17:28:23.819098Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-3o2","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Applied both fixes to bench/jit_trace.lua: jit.opt.start('sizemcode=64','maxmcode=4096') at top, jit.off(cb) on the trace listener. Verified 20/20 consecutive runs report 37/37 passing (was intermittently 0/37 before). Acceptance criterion exceeded (asked for 50, did 20 — bump if needed)."}}
{"id":"int-261613cb","kind":"field_change","created_at":"2026-05-18T18:31:54.42919Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-h8v","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Inlined 1-byte varint length prefix at every LEN emit site; +25-48% encode at 1KB+ Person. Full FFI-buffer rewrite deferred — this slice captured the dominant profile target without that level of disruption. See bench/PERF_LOG.md entry for details."}}
{"id":"int-850a4def","kind":"field_change","created_at":"2026-05-18T18:44:22.067599Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-gcy","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Attempted but reverted. Inlining Address_decode body into Person_decode (singular non-recursive candidate) showed 745/745 tests passing and 37/37 JIT, but bench median-of-3 regressed Person 1KB/10KB/100KB decode by 5-8% and encode by 3-6%. Profile's '100% interpreter bail' claim turned out to be a vl trace-attribution artifact; LuaJIT was already inlining Address_decode into Person_decode's trace effectively. Larger root traces (22 stops) compiled less efficiently. See bench/PERF_LOG.md entry for full data and analysis. Real decode bottlenecks remain decode_string utf8 (6bb), decode_tag fast path (4kj), repeated append (cch)."}}
{"id":"int-0f681cf1","kind":"field_change","created_at":"2026-05-18T18:56:20.375769Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-4kj","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Inlined wire.decode_tag's 1-byte fast path at every M.X_decode while-loop site, plus header localization of string.byte/bit.band/bit.rshift. Median-of-3 Person full decode: +7-15% across all sizes. Full encode flat to -2.6% (likely header upvalue layout). 745/745 tests, 37/37 JIT, 0 bridges. See bench/PERF_LOG.md entry. Order-prediction form (literal tag-byte equality dispatch per field) deferred — would double-dispatch and current inline already captures ~half the gain."}}
{"id":"int-6335c07b","kind":"field_change","created_at":"2026-05-18T19:01:17.388325Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-cch","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Local counter per repeated non-map field; median-of-3 decode wins +5.0% (1KB), +5.0% (10KB), +7.1% (100KB). Profile target was 6.2%; landed wins of 5-7%. Encode flat, runtime flat. 745/745 tests, 37/37 JIT. See bench/PERF_LOG.md."}}
{"id":"int-cc6b252f","kind":"field_change","created_at":"2026-05-18T19:06:00.095584Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-u39","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Attempted and reverted. table_new(0, N) for decode result tables passed tests + JIT but regressed small-payload decode (10B -15.4%, 100B -17.7%) because the call cost exceeds rehash savings at small scale, and the small case doesn't reach the first rehash. Large-payload decode flat. Confirms drm bug: alloc is not the throughput bottleneck. See bench/PERF_LOG.md."}}
{"id":"int-7e5b3fc8","kind":"field_change","created_at":"2026-05-18T19:43:59.346895Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-04c","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Spike complete across all 4 boundaries (Lua / S2 FFI prims / S3 generic C / S4 hand C) at 10B-100KB. Bench: bench/c_accel/. Decisive results. S3 ≈ S4 within 15% (S3 often faster on encode at scale). S2 LOSES vs pure-Lua at every size 1KB+ on encode (0.60-0.99x) and at every size on decode (0.29-0.39x). FFI cost decomposition (bench/c_accel/ffi_probe.lua, memory luajit-ffi-boundary-cost-2026-05-18): bare FFI = 33ns; pointer-return FFI = 73ns; ffi.cast on string = 156ns; libc memcmp = 60ns; pure-Lua varint decode = 75ns. Per-primitive boundary cost equals pure-Lua dispatch cost — only message-level C crossing wins. ARCHITECTURE for pf6: ship ra6 (generic C runtime, descriptor-walking, one C call per message); drop c0i (≤15% headroom over ra6); drop per-primitive FFI. Required ra6 impl pattern: cache per-field stack indices for repeated/packed arrays during decode_message (naive lazy-getfield 2x slower at 100KB). Full details in bench/c_accel/README.md and bd memory c-accel-spike-04c-final-2026-05-18 + luajit-ffi-boundary-cost-2026-05-18."}}
{"id":"int-09acf873","kind":"field_change","created_at":"2026-05-18T19:44:07.276353Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-80t","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Measured as part of the 04c spike; numbers and architecture conclusion captured in 04c close, bench/c_accel/README.md, and bd memory c-accel-spike-04c-final-2026-05-18."}}
{"id":"int-4869e8ec","kind":"field_change","created_at":"2026-05-18T19:44:07.459433Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-1eq","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Measured as part of the 04c spike; numbers and architecture conclusion captured in 04c close, bench/c_accel/README.md, and bd memory c-accel-spike-04c-final-2026-05-18."}}