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

Add polyfill for Parquet compression codecs #857

Closed
wants to merge 1 commit into from

Conversation

stloyd
Copy link
Member

@stloyd stloyd commented Dec 1, 2023

Change Log

Added

  • Add polyfill for Parquet compression codecs

Fixed

Changed

Removed

Deprecated

Security


Description

Copy link
Contributor

github-actions bot commented Dec 1, 2023

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
| benchmark             | subject           | revs | its | mem_peak         | mode             | rstdev          |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
| AvroExtractorBench    | bench_extract_10k | 1    | 3   | 35.122mb +0.01%  | 716.270ms +2.27% | ±1.53% +393.59% |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.820mb +0.08%   | 302.412ms +0.05% | ±1.00% +265.13% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.919mb +0.08%   | 929.424ms +0.64% | ±0.22% -74.11%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.625mb +0.03% | 1.102s -1.24%    | ±1.13% +19.03%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.698mb +0.09%   | 24.890ms -3.08%  | ±1.96% +39.22%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.699mb +0.09%   | 405.293ms -0.73% | ±0.66% -0.73%   |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev        |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.385mb +0.00% | 63.718ms -2.84% | ±1.49% -9.21% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.783mb +0.00%  | 439.157ms -7.18% | ±0.94% -72.53%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.860mb +0.01%  | 71.885ms -1.33%  | ±0.40% -66.27%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.443mb +0.00% | 54.425ms -2.79%  | ±0.62% -16.33%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.653mb +0.00% | 1.483s +0.59%    | ±2.44% +241.43% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.737mb +0.02%  | 41.656ms -0.95%  | ±0.15% -85.09%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.435mb +0.01%  | 2.644ms -5.10%   | ±0.96% -37.96%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.228mb +0.00%  | 186.178ms +1.60% | ±0.44% -19.87%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.754mb +0.01%  | 18.846ms +2.00%  | ±0.41% +0.94%   |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.675mb +0.01%  | 1.662ms -8.21%   | ±0.77% -67.19%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.675mb +0.01%  | 1.623ms -10.40%  | ±1.30% -49.76%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.787mb +0.01%  | 2.644ms -9.27%   | ±1.97% +354.48% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.316mb +0.01%  | 14.579ms -14.05% | ±1.72% +93.60%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.316mb +0.01%  | 14.380ms -14.25% | ±0.67% -64.91%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.219mb +0.01%  | 1.706μs -14.70%  | ±2.72% +0.00%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.219mb +0.01%  | 0.300μs -25.00%  | ±0.00% -100.00% |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.776mb +0.00%  | 12.680ms -7.64%  | ±2.67% -10.47%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.135mb +0.00% | 62.958ms -4.20%  | ±0.33% -74.94%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.837mb +0.01%  | 1.766ms -10.44%  | ±1.79% -30.86%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 78.110mb +0.01%  | 33.147ms -15.01% | ±0.65% +14.13%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.937mb +0.01%  | 3.816ms -7.46%   | ±0.07% -95.31%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.364mb +0.01%  | 39.341ms -0.63%  | ±0.50% -81.51%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.365mb +0.01%  | 39.775ms -0.12%  | ±0.78% +253.98% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.364mb +0.01%  | 39.970ms -0.58%  | ±0.28% -83.49%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.661mb +0.01%  | 7.428ms -1.02%   | ±1.14% -17.06%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.219mb +0.01%  | 29.485ms +2.57%  | ±1.44% -6.01%   |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.219mb +0.01%  | 13.212μs +0.22%  | ±0.71% -56.25%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.219mb +0.01%  | 15.483μs -2.73%  | ±1.38% +56.67%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.229mb +0.00%  | 188.056ms +3.62% | ±1.01% -1.94%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.380mb +0.01%  | 337.144ms +0.74% | ±0.79% +59.12%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.303mb +0.03%  | 65.743ms -1.18%  | ±2.46% +36.17%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.978mb +0.00% | 383.509ms -3.10% | ±1.21% -44.19%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.696mb +0.01%  | 197.442ms +2.32% | ±0.92% +24.44%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.821mb +0.03%  | 40.785ms +2.76%  | ±0.51% +5.86%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@norberttech
Copy link
Member

I'm going to cover these one by one while working on the compressions, depending on the complexity, I might be able to create actual polyfils in pure PHP.

@norberttech norberttech closed this Dec 1, 2023
@stloyd stloyd deleted the compression-polyfill branch December 1, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants