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

Added ArrayLoader with usage example #1226

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

norberttech
Copy link
Member

Change Log

Added

  • to_array() loader with usage example

Fixed

Changed

Removed

Deprecated

Security


Description

Copy link
Contributor

github-actions bot commented Sep 16, 2024

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          |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.541mb +0.11%  | 507.420ms -0.16% | ±0.04% -75.63%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.655mb +0.11%  | 1.079s +0.66%    | ±0.65% +260.17% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 29.112mb +0.02% | 434.104ms +1.30% | ±1.04% +311.39% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.298mb +0.12%  | 33.411ms +0.51%  | ±0.85% -44.58%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.279mb +0.12%  | 686.041ms +0.50% | ±1.60% -7.05%   |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 116.574mb +0.00% | 59.788ms -0.82% | ±0.74% -24.46% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.739mb +0.01%  | 140.932ms +0.10% | ±0.99% -42.20%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 90.348mb +0.01%  | 116.998ms -1.48% | ±0.52% -44.52%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 124.467mb +0.01% | 1.235s +0.29%    | ±0.42% +383.38% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.488mb +0.03%  | 44.621ms +0.57%  | ±0.34% +249.58% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 107.417mb +0.00% | 475.751ms -0.70% | ±0.40% -81.87%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.775mb +0.01%  | 240.110ms +0.72% | ±0.95% +34.36%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.613mb +0.03%  | 52.966ms +2.54%  | ±0.94% +52.59%  |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 87.330mb +0.01%  | 3.670ms +0.86%   | ±1.55% +19.26%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 102.934mb +0.00% | 194.751ms +3.09% | ±2.34% +103.60% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 85.654mb +0.01%  | 18.760ms -0.66%  | ±0.32% -67.09%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 88.570mb +0.01%  | 1.856ms -4.40%   | ±0.44% -72.91%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 88.570mb +0.01%  | 1.872ms -1.73%   | ±2.02% -42.31%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 85.682mb +0.01%  | 3.111ms +2.58%   | ±3.21% +35.20%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 86.211mb +0.08%  | 18.845ms +0.63%  | ±1.34% +349.85% |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 86.211mb +0.08%  | 19.210ms +1.02%  | ±3.31% +613.33% |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 84.115mb +0.01%  | 1.706μs 0.00%    | ±2.72% 0.00%    |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 84.115mb +0.01%  | 0.300μs -25.00%  | ±0.00% -100.00% |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 93.465mb +0.08%  | 13.178ms +6.90%  | ±2.66% +78.98%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 122.836mb +0.06% | 61.799ms -0.03%  | ±1.06% -33.38%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 86.731mb +0.08%  | 1.746ms +0.94%   | ±2.22% +157.30% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 90.087mb +0.01%  | 60.387ms +3.37%  | ±0.44% -19.26%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 88.832mb +0.01%  | 4.474ms -5.44%   | ±2.93% -10.79%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 84.264mb +0.01%  | 41.055ms +3.22%  | ±0.98% +35.51%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 84.265mb +0.01%  | 39.947ms +2.90%  | ±0.57% -49.35%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 84.264mb +0.01%  | 39.092ms +1.59%  | ±1.62% +13.71%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 86.556mb +0.01%  | 7.444ms -0.58%   | ±0.79% -0.73%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 84.115mb +0.08%  | 28.727ms -0.10%  | ±0.06% -89.30%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 84.115mb +0.01%  | 13.864μs +1.94%  | ±2.06% +71.94%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 84.115mb +0.01%  | 16.359μs +0.36%  | ±1.51% +51.21%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 102.935mb +0.00% | 194.755ms +3.91% | ±0.82% -60.08%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 53.220mb +0.01%  | 391.032ms -1.14% | ±0.49% -81.76%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 13.486mb +0.04%  | 84.961ms +7.71%  | ±3.34% +610.58% |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@github-actions github-actions bot added size: M and removed size: S labels Sep 16, 2024
@norberttech norberttech merged commit e680520 into flow-php:1.x Sep 16, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant