Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Impl reader+writer seek #360

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

wcampbell0x2a
Copy link
Collaborator

@wcampbell0x2a wcampbell0x2a commented Sep 4, 2023

  • Add Seek to Reader and Writer
  • Add as_mut to Reader, and tests
  • Add: seek_rewind, seek_from_current, seek_from_end, seek_from_start,

See #105

Currently being used in https://github.com/wcampbell0x2a/cpio-deku

Needs

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Benchmark for c05f1ba

Click to view benchmark
Test Base PR %
deku_read_bits 784.1±1.34ns 784.1±1.36ns 0.00%
deku_read_byte 23.5±0.11ns 23.5±0.08ns 0.00%
deku_read_enum 10.1±0.08ns 10.1±0.07ns 0.00%
deku_read_vec 65.4±0.34ns 68.2±0.77ns +4.28%
deku_write_bits 105.5±0.39ns 105.9±1.16ns +0.38%
deku_write_byte 164.3±0.91ns 163.5±0.76ns -0.49%
deku_write_enum 105.8±0.35ns 105.8±0.31ns 0.00%
deku_write_vec 4.0±0.01µs 4.0±0.01µs 0.00%

@wcampbell0x2a wcampbell0x2a force-pushed the impl-reader branch 5 times, most recently from 9e6aca1 to bf6defb Compare September 8, 2023 01:37
@wcampbell0x2a wcampbell0x2a force-pushed the impl-reader branch 2 times, most recently from 1d23236 to c0f9fd4 Compare November 19, 2023 02:57
Base automatically changed from impl-reader to master December 14, 2023 01:53
@wcampbell0x2a wcampbell0x2a changed the base branch from master to impl-writer December 20, 2023 05:00
Copy link

Benchmark for f9655f8

Click to view benchmark
Test Base PR %
deku_read_bits 1253.9±14.83ns 1293.6±23.46ns +3.17%
deku_read_byte 21.8±0.59ns 21.8±0.54ns 0.00%
deku_read_enum 9.5±0.16ns 9.4±0.15ns -1.05%
deku_read_vec 59.5±0.65ns 58.6±0.82ns -1.51%
deku_write_bits 142.6±5.32ns 225.8±16.05ns +58.35%
deku_write_byte 142.1±4.61ns 20.9±0.36ns -85.29%
deku_write_enum 84.4±2.43ns 19.6±0.33ns -76.78%
deku_write_vec 3.3±0.07µs 300.4±4.12ns -90.90%

Copy link

Benchmark for 84fd5f3

Click to view benchmark
Test Base PR %
deku_read_bits 1116.3±18.52ns 1197.5±16.33ns +7.27%
deku_read_byte 21.6±0.49ns 22.2±1.48ns +2.78%
deku_read_enum 9.3±0.15ns 9.3±0.13ns 0.00%
deku_read_vec 53.5±0.59ns 53.9±0.51ns +0.75%
deku_write_bits 180.7±3.25ns 188.7±21.84ns +4.43%
deku_write_byte 21.2±2.63ns 20.8±0.23ns -1.89%
deku_write_enum 20.2±0.36ns 20.1±0.18ns -0.50%
deku_write_vec 298.2±5.20ns 296.1±3.47ns -0.70%

Base automatically changed from impl-writer to master April 29, 2024 22:03
@wcampbell0x2a wcampbell0x2a force-pushed the impl-reader-seek branch 2 times, most recently from e9143bb to 0138356 Compare May 4, 2024 16:45
Copy link

github-actions bot commented May 4, 2024

Benchmark for e6c5a67

Click to view benchmark
Test Base PR %
deku_read_bits 1229.2±16.47ns 1261.1±14.49ns +2.60%
deku_read_byte 3.3±0.12ns 3.3±0.08ns 0.00%
deku_read_enum 2.6±0.07ns 2.6±0.04ns 0.00%
deku_read_vec 33.7±0.47ns 33.4±0.33ns -0.89%
deku_write_bits 149.5±4.52ns 149.0±2.81ns -0.33%
deku_write_byte 21.8±0.51ns 22.0±0.31ns +0.92%
deku_write_enum 21.1±0.31ns 21.4±0.26ns +1.42%
deku_write_vec 351.9±3.46ns 405.2±5.23ns +15.15%

Copy link

github-actions bot commented May 4, 2024

Benchmark for cee1fd3

Click to view benchmark
Test Base PR %
deku_read_bits 1289.2±17.71ns 1219.4±15.03ns -5.41%
deku_read_byte 3.3±0.07ns 3.4±0.29ns +3.03%
deku_read_enum 2.6±0.06ns 2.6±0.03ns 0.00%
deku_read_vec 34.5±0.40ns 34.3±0.33ns -0.58%
deku_write_bits 148.8±2.97ns 155.7±3.30ns +4.64%
deku_write_byte 22.0±0.29ns 21.9±0.40ns -0.45%
deku_write_enum 21.1±0.26ns 21.2±0.79ns +0.47%
deku_write_vec 408.3±5.52ns 354.0±3.25ns -13.30%

@wcampbell0x2a wcampbell0x2a changed the title DRAFT: Impl reader seek Impl reader seek May 4, 2024
Copy link

github-actions bot commented May 4, 2024

Benchmark for 2a61000

Click to view benchmark
Test Base PR %
deku_read_bits 1222.2±15.48ns 1250.6±43.96ns +2.32%
deku_read_byte 3.5±0.07ns 3.3±0.03ns -5.71%
deku_read_enum 3.0±0.05ns 2.6±0.06ns -13.33%
deku_read_vec 34.9±0.67ns 34.4±0.62ns -1.43%
deku_write_bits 157.5±3.33ns 235.5±3.68ns +49.52%
deku_write_byte 22.0±0.22ns 22.6±0.29ns +2.73%
deku_write_enum 21.4±0.37ns 21.4±0.31ns 0.00%
deku_write_vec 423.2±4.81ns 417.7±24.23ns -1.30%

Copy link

github-actions bot commented May 4, 2024

Benchmark for d862393

Click to view benchmark
Test Base PR %
deku_read_bits 1283.7±14.74ns 1276.0±56.88ns -0.60%
deku_read_byte 3.5±0.06ns 3.3±0.05ns -5.71%
deku_read_enum 3.0±0.05ns 2.6±0.05ns -13.33%
deku_read_vec 33.7±0.64ns 33.6±0.62ns -0.30%
deku_write_bits 154.8±4.91ns 148.6±6.87ns -4.01%
deku_write_byte 21.8±0.28ns 21.6±0.40ns -0.92%
deku_write_enum 21.1±0.44ns 21.1±0.31ns 0.00%
deku_write_vec 424.7±17.49ns 350.7±4.28ns -17.42%

@wcampbell0x2a wcampbell0x2a changed the title Impl reader seek Impl reader+writer seek May 14, 2024
@wcampbell0x2a wcampbell0x2a changed the title Impl reader+writer seek DRAFT: Impl reader+writer seek May 14, 2024
Copy link

Benchmark for 26c8d2a

Click to view benchmark
Test Base PR %
deku_read_bits 1234.8±24.41ns 1289.0±9.75ns +4.39%
deku_read_byte 3.5±0.07ns 3.3±0.05ns -5.71%
deku_read_enum 3.0±0.05ns 2.6±0.05ns -13.33%
deku_read_vec 34.4±0.58ns 33.5±0.31ns -2.62%
deku_write_bits 149.2±3.32ns 157.6±3.18ns +5.63%
deku_write_byte 21.9±0.20ns 24.5±0.37ns +11.87%
deku_write_enum 21.1±0.34ns 23.0±0.37ns +9.00%
deku_write_vec 404.8±5.36ns 439.4±5.98ns +8.55%

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.

None yet

1 participant