This is an archive of the discontinued Mercurial Phabricator instance.

radixbuf: implement basic serialization logic
AbandonedPublic

Authored by quark on Oct 20 2017, 8:01 PM.
Tags
None
Subscribers

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This is the first step of a revised radix index implementation in Rust that
was previously implemented in Python and C [1]. The importance of the data
structure is mentioned in the original commit message [1]. And the
performance win is significant when used properly [2].

Choosing Rust for its high level abstractions, type safety, and
compelling-to-C performance.

The radixbuf uses a flat, continuous buffer as the source of truth of the
index. Therefore it needs serialization support. This patch adds basic
serialization interface and implements serialization for common unsigned
integers.

[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-June/099184.html
[2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-June/099197.html

Test Plan

cargo test

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Oct 20 2017, 8:01 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 20 2017, 8:01 PM
quark edited the test plan for this revision. (Show Details)Oct 20 2017, 8:02 PM
quark added a subscriber: durin42.Oct 20 2017, 8:02 PM
quark planned changes to this revision.Oct 21 2017, 4:26 PM

Value types also need part of the serialization interface.

quark edited the summary of this revision. (Show Details)Oct 23 2017, 4:12 PM
quark retitled this revision from keyid: implement a submodule that does Key <-> Id conversion to radixbuf: implement basic serialization logic.
quark updated this revision to Diff 3067.
quark planned changes to this revision.Oct 24 2017, 3:08 PM

Some types are not used. Could be further simplified.

quark abandoned this revision.Nov 2 2017, 2:48 PM

D1292 does not need serialize