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

Initial Python binding support #190

Merged
merged 16 commits into from
Feb 8, 2024
Merged

Initial Python binding support #190

merged 16 commits into from
Feb 8, 2024

Conversation

commial
Copy link
Contributor

@commial commial commented Jan 12, 2024

Depends on #189

Fix #139

Initial Python binding support, with PyO3. The build environment relies on maturin and the tests are made with pytest.

@commial commial added enhancement New feature or request tests Relative to the testing capabilities labels Jan 12, 2024
@commial commial self-assigned this Jan 12, 2024
@commial commial mentioned this pull request Jan 12, 2024
@commial commial changed the title [WIP] Initial Python binding support Initial Python binding support Jan 22, 2024
Copy link

Benchmark for 763a2a5

Click to view benchmark
Test Base PR %
chunk_size_decompress_mutilfiles_random/Layers(0x0)/1024 543.3±69.86ns 501.9±65.80ns -7.62%
chunk_size_decompress_mutilfiles_random/Layers(0x0)/1048576 47.9±5.70µs 40.5±3.94µs -15.45%
chunk_size_decompress_mutilfiles_random/Layers(0x0)/16777216 690.5±13.39µs 715.1±23.32µs +3.56%
chunk_size_decompress_mutilfiles_random/Layers(0x0)/65536 3.5±0.37µs 3.4±0.27µs -2.86%
chunk_size_decompress_mutilfiles_random/Layers(COMPRESS)/1024 801.9±445.20µs 802.9±446.94µs +0.12%
chunk_size_decompress_mutilfiles_random/Layers(COMPRESS)/1048576 40.1±0.36ms 39.9±0.06ms -0.50%
chunk_size_decompress_mutilfiles_random/Layers(COMPRESS)/16777216 159.7±1.54ms 159.3±0.30ms -0.25%
chunk_size_decompress_mutilfiles_random/Layers(COMPRESS)/65536 6.6±3.71ms 6.6±3.74ms 0.00%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT | COMPRESS)/1024 1052.6±583.67µs 1056.0±586.84µs +0.32%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT | COMPRESS)/1048576 38.9±0.04ms 39.0±0.10ms +0.26%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT | COMPRESS)/16777216 249.4±0.36ms 249.4±0.28ms 0.00%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT | COMPRESS)/65536 6.5±3.07ms 6.5±3.07ms 0.00%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT)/1024 948.2±221.19µs 831.1±200.16µs -12.35%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT)/1048576 8.6±0.22ms 8.5±0.22ms -1.16%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT)/16777216 123.2±0.09ms 123.1±0.18ms -0.08%
chunk_size_decompress_mutilfiles_random/Layers(ENCRYPT)/65536 1545.5±36.52µs 1417.3±35.52µs -8.30%
failsafe_multiple_layers_repair/Layers(0x0)/4194304 27.3±0.18ms 27.3±0.23ms 0.00%
failsafe_multiple_layers_repair/Layers(COMPRESS)/4194304 68.7±0.18ms 68.5±0.17ms -0.29%
failsafe_multiple_layers_repair/Layers(ENCRYPT | COMPRESS)/4194304 76.9±0.22ms 77.0±0.17ms +0.13%
failsafe_multiple_layers_repair/Layers(ENCRYPT)/4194304 37.9±0.62ms 37.8±0.40ms -0.26%
reader_multiple_layers_multiple_block_size/Layers(0x0)/1024 69.7±16.02ns 68.7±6.98ns -1.43%
reader_multiple_layers_multiple_block_size/Layers(0x0)/1048576 44.7±2.93µs 44.2±2.54µs -1.12%
reader_multiple_layers_multiple_block_size/Layers(0x0)/16777216 679.1±9.38µs 675.9±12.54µs -0.47%
reader_multiple_layers_multiple_block_size/Layers(0x0)/65536 2.8±0.14µs 2.7±0.19µs -3.57%
reader_multiple_layers_multiple_block_size/Layers(COMPRESS)/1024 3.2±2.57µs 3.2±2.58µs 0.00%
reader_multiple_layers_multiple_block_size/Layers(COMPRESS)/1048576 5.0±2.97ms 5.0±3.03ms 0.00%
reader_multiple_layers_multiple_block_size/Layers(COMPRESS)/16777216 119.3±0.25ms 119.9±0.54ms +0.50%
reader_multiple_layers_multiple_block_size/Layers(COMPRESS)/65536 208.6±167.51µs 209.8±168.20µs +0.58%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/1024 14.9±1.31µs 14.9±1.33µs 0.00%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/1048576 15.1±0.02ms 15.5±1.29ms +2.65%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/16777216 247.6±0.51ms 247.2±1.41ms -0.16%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/65536 912.1±74.90µs 912.7±74.28µs +0.07%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT)/1024 7.9±0.25µs 7.9±0.25µs 0.00%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT)/1048576 8.1±0.23ms 8.1±0.23ms 0.00%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT)/16777216 131.9±4.10ms 130.8±0.12ms -0.83%
reader_multiple_layers_multiple_block_size/Layers(ENCRYPT)/65536 502.0±15.28µs 502.3±15.34µs +0.06%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(0x0)/1024 472.7±14.95ns 471.6±15.37ns -0.23%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(0x0)/1048576 42.3±5.40µs 41.8±4.02µs -1.18%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(0x0)/16777216 683.3±14.34µs 708.6±35.10µs +3.70%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(0x0)/65536 3.4±0.24µs 3.4±0.38µs 0.00%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(COMPRESS)/1024 11.2±0.08µs 11.2±0.06µs 0.00%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(COMPRESS)/1048576 10.0±0.03ms 10.0±0.02ms 0.00%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(COMPRESS)/16777216 159.5±0.34ms 159.3±0.53ms -0.13%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(COMPRESS)/65536 631.0±6.15µs 629.5±8.84µs -0.24%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT | COMPRESS)/1024 17.4±0.15µs 17.3±0.12µs -0.57%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT | COMPRESS)/1048576 15.7±0.05ms 16.4±0.02ms +4.46%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT | COMPRESS)/16777216 249.7±0.37ms 262.6±0.58ms +5.17%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT | COMPRESS)/65536 976.2±5.87µs 1025.6±7.39µs +5.06%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT)/1024 8.2±0.09µs 8.6±0.09µs +4.88%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT)/1048576 7.8±0.02ms 7.2±0.04ms -7.69%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT)/16777216 125.9±0.26ms 114.6±0.07ms -8.98%
reader_multiple_layers_multiple_block_size_multifiles_linear/Layers(ENCRYPT)/65536 471.5±7.85µs 480.7±41.65µs +1.95%
writer_multiple_layers_multiple_block_size/Layers(0x0)/1024 3.5±0.06µs 3.5±0.05µs 0.00%
writer_multiple_layers_multiple_block_size/Layers(0x0)/1048576 3.4±0.09ms 3.4±0.10ms 0.00%
writer_multiple_layers_multiple_block_size/Layers(0x0)/16777216 54.2±0.84ms 54.1±0.71ms -0.18%
writer_multiple_layers_multiple_block_size/Layers(0x0)/65536 210.3±5.95µs 210.2±6.09µs -0.05%
writer_multiple_layers_multiple_block_size/Layers(COMPRESS)/1024 6.6±0.55µs 6.0±0.20µs -9.09%
writer_multiple_layers_multiple_block_size/Layers(COMPRESS)/1048576 10.8±0.37ms 9.8±0.36ms -9.26%
writer_multiple_layers_multiple_block_size/Layers(COMPRESS)/16777216 333.4±1.85ms 339.7±5.23ms +1.89%
writer_multiple_layers_multiple_block_size/Layers(COMPRESS)/65536 417.9±36.18µs 423.9±39.44µs +1.44%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/1024 6.3±0.43µs 6.2±0.51µs -1.59%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/1048576 12.3±0.43ms 12.3±0.04ms 0.00%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/16777216 423.2±1.35ms 432.7±2.03ms +2.24%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT | COMPRESS)/65536 440.6±4.33µs 382.8±3.12µs -13.12%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT)/1024 11.3±0.05µs 11.9±0.23µs +5.31%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT)/1048576 10.8±0.06ms 11.3±0.06ms +4.63%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT)/16777216 172.2±0.68ms 181.6±4.20ms +5.46%
writer_multiple_layers_multiple_block_size/Layers(ENCRYPT)/65536 673.1±4.08µs 727.3±4.46µs +8.05%

@commial commial merged commit 53136a3 into master Feb 8, 2024
33 of 34 checks passed
@commial commial deleted the python-binding branch February 8, 2024 10:35
@commial commial added this to the mla v1.5.0 milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests Relative to the testing capabilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python binding support
1 participant