Skip to content

docs: update purego comparison with verified source claims#29

Merged
kolkov merged 1 commit intomainfrom
docs/comparison-accuracy-update
Mar 2, 2026
Merged

docs: update purego comparison with verified source claims#29
kolkov merged 1 commit intomainfrom
docs/comparison-accuracy-update

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented Mar 2, 2026

Summary

Update purego comparison claims with data verified directly from purego source code (reference/purego/).

Changes verified from source:

  • ARM64 HFA: "top-level only" → "partial recursive (bug in nested path)" — struct_arm64.go:256
  • Platforms: "9+" → "8 GOARCH / 20+ OS×ARCH" — 8 zcallback_*.s files
  • Per-call allocations: added "reflect dispatch" — func.go reflect.MakeFunc closure
  • Struct pass/return: "Full" → "Partial (no Windows structs)" — issue #237 open
  • Callback float returns: clarified "Not supported (panic)" — syscall_sysv.go:95
  • purego overhead: "~100 ns" → "Not published" — no official benchmarks exist
  • Added JupiterRider/ffi to "See also" section

Test plan

  • CI passes (docs only, no code changes)
  • Comparison table renders correctly on GitHub

- ARM64 HFA: 'top-level only' → 'partial recursive (bug in nested path)'
  verified from purego/struct_arm64.go:256 (isHFA passes first.Type instead of Field(i).Type)
- Platforms: '9+ architectures' → '8 GOARCH / 20+ OS×ARCH'
  verified from purego/zcallback_*.s (8 files: 386, amd64, arm, arm64, loong64, ppc64le, riscv64, s390x)
- Per-call: 'sync.Pool per call' → 'reflect + sync.Pool per call'
  verified from purego/func.go (reflect.MakeFunc closure + thePool)
- Struct pass/return: 'Full' → 'Partial (no Windows structs)'
  purego issue #237 still open
- Callback float returns: clarified as 'Not supported (panic)'
  verified from purego/syscall_sysv.go:95
- purego overhead: '~100 ns' → 'Not published' (no official benchmarks exist)
- Add JupiterRider/ffi to See also (purego binding for libffi, 203 stars)
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 9436868 into main Mar 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant