Skip to content

[#67] Research: reject the absolute-long-offset VarHandle adapter - #121

Closed
peter-lawrey wants to merge 1 commit into
developfrom
feat/Zero-Allocation-Hashing-67-prototype-java-9-mr-jar-varhandle
Closed

[#67] Research: reject the absolute-long-offset VarHandle adapter#121
peter-lawrey wants to merge 1 commit into
developfrom
feat/Zero-Allocation-Hashing-67-prototype-java-9-mr-jar-varhandle

Conversation

@peter-lawrey

@peter-lawrey peter-lawrey commented Aug 20, 2026

Copy link
Copy Markdown
Member

Disposition

Closed unmerged. The experiment was successful, but its result rejects the
implementation proposed by this PR.

Scoped result

The prototype produced the same outputs as the existing Unsafe path in 2,730
exercised comparisons. In the retained JDK 11/17/21/25 matrix, adapting the
current absolute-long-offset Access API to byte-array view VarHandles was
slower for XXH3 at every tested size and alignment.

This does not establish that VarHandle is inherently slower. The experiment did
not cover a specialised relative-int-offset path, XxHash, streaming input,
heap/direct ByteBuffer or raw memory. The adapter also initialises and uses
Unsafe infrastructure, so it is not an Unsafe-denial fallback.

Durable evidence

The cleaned branch contains a research-only archive rooted at develop:

  • scoped report and limitations;
  • corrected reproduction instructions;
  • explicitly activated prototype patch;
  • complete aggregate table;
  • raw JMH JSON and logs for JDK 11, 17, 21 and 25;
  • retained JDK 21 reproduction; and
  • equivalence/full-test log.

Archive commit:
https://github.com/OpenHFT/Zero-Allocation-Hashing/tree/2339c0db7fdac48b7564e93aeeb732e6bee0af95/research/issue-67

Follow-up

The complete post-Unsafe architecture is tracked in
#124.

Related to #67. This PR does not merge or close the successor issue.

@peter-lawrey
peter-lawrey changed the base branch from ea to develop August 21, 2026 14:18
Record the scoped conclusion, raw JMH evidence, reproducible prototype patch and independent JDK 21 rerun. The measured absolute-long-offset adapter is rejected without generalising the result to all VarHandle designs.
@peter-lawrey
peter-lawrey force-pushed the feat/Zero-Allocation-Hashing-67-prototype-java-9-mr-jar-varhandle branch from 15971be to 2339c0d Compare August 21, 2026 14:41
@peter-lawrey peter-lawrey changed the title [#67] Draft increment: Replace Unsafe with VarHandle [#67] Research: reject the absolute-long-offset VarHandle adapter Aug 21, 2026
@peter-lawrey

Copy link
Copy Markdown
Member Author

This PR is being closed unmerged because the experiment's result rejects the
implementation proposed by the PR.

The durable research archive is available at
https://github.com/OpenHFT/Zero-Allocation-Hashing/tree/2339c0db7fdac48b7564e93aeeb732e6bee0af95/research/issue-67.
It contains the
scoped conclusion, corrected reproducibility instructions, prototype patch,
aggregate table, raw JMH JSON/logs and the equivalence-test log.

The evidence supports a narrow conclusion: adapting the current
absolute-long-offset Access API to byte-array view VarHandles is slower for
XXH3 on the tested JDKs and payloads. It does not establish that VarHandle is
inherently slower, and the adapter cannot serve as an Unsafe-denial fallback.

Successor design work is tracked in
#124.

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