Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • Structure Select function

Fixed

Changed

Removed

Deprecated

Security


Description

Technically speaking the same thing is possible through arrayDot notation, however this approach is much more developer friendly since ref('struct')->structure() provides autocompletion with all available functions.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 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.152mb +0.00%  | 757.017ms -2.11% | ±1.07% +91.71%   |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.803mb +0.04%   | 342.033ms -1.37% | ±0.86% -56.32%   |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.901mb +0.04%   | 981.263ms -1.36% | ±1.55% +1468.01% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.607mb +0.00% | 1.140s -2.52%    | ±0.27% -59.65%   |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.670mb +0.04%   | 57.171ms -0.66%  | ±0.13% -75.00%   |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.671mb +0.04%   | 466.567ms -0.01% | ±0.38% +7.34%    |
+-----------------------+-------------------+------+-----+------------------+------------------+------------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.393mb +0.00% | 64.592ms -0.47% | ±0.95% +30.55% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.765mb +0.00%  | 443.041ms -2.35% | ±0.28% -74.55% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.843mb +0.00%  | 74.276ms +0.59%  | ±0.52% -46.87% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.359mb +0.00% | 57.235ms +2.02%  | ±0.65% -65.32% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.569mb +0.00% | 1.254s -2.65%    | ±0.18% -87.58% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.720mb +0.01%  | 41.078ms -0.97%  | ±0.48% +27.47% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 116.013mb +0.00% | 396.479ms -2.90% | ±0.90% -12.91%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.731mb +0.00%  | 195.920ms -2.96% | ±0.61% -51.75%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.857mb +0.01%  | 41.300ms -3.72%  | ±1.01% -12.04%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.404mb +0.00%  | 328.916ms -2.91% | ±0.32% -23.04%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.328mb +0.01%  | 64.978ms -2.19%  | ±1.08% -23.77%  |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.470mb +0.00%  | 4.244ms +7.68%   | ±0.76% -44.85%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.263mb +0.00%  | 182.020ms -0.78% | ±0.03% -97.27%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.789mb +0.00%  | 18.391ms +0.95%  | ±1.35% +264.05% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.710mb +0.00%  | 1.668ms -8.07%   | ±1.21% -39.20%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.710mb +0.00%  | 1.684ms -6.97%   | ±0.81% -65.56%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.822mb +0.00%  | 2.585ms -13.05%  | ±3.06% +234.37% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.351mb +0.00%  | 14.811ms +1.44%  | ±0.50% +71.13%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.351mb +0.00%  | 14.805ms -0.05%  | ±2.19% +44.93%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.254mb +0.00%  | 1.806μs 0.00%    | ±2.57% 0.00%    |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.254mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.877mb +0.00%  | 12.949ms -4.66%  | ±0.12% -88.45%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.171mb +0.00% | 65.394ms +2.37%  | ±1.13% +104.32% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.871mb +0.00%  | 1.212ms -3.19%   | ±0.27% -83.98%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 78.145mb +0.00%  | 36.914ms -3.10%  | ±0.69% +39.36%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.973mb +0.00%  | 4.175ms +6.17%   | ±0.75% +30.64%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.400mb +0.00%  | 39.594ms -3.23%  | ±0.48% -62.39%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.401mb +0.00%  | 40.556ms -1.48%  | ±0.14% -78.75%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.400mb +0.00%  | 40.217ms -3.30%  | ±0.75% +56.85%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.697mb +0.00%  | 7.452ms -6.34%   | ±0.03% -99.01%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.254mb +0.00%  | 28.972ms -1.86%  | ±0.41% -63.67%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.254mb +0.00%  | 14.560μs +2.54%  | ±2.31% +33.75%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.254mb +0.00%  | 17.666μs -1.06%  | ±2.41% +17.57%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.265mb +0.00%  | 186.720ms -0.16% | ±0.50% +8.09%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@github-actions github-actions bot added size: M and removed size: S labels Dec 30, 2023
@norberttech norberttech merged commit 5ffd260 into flow-php:1.x Dec 30, 2023
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