Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Nov 21, 2023

Change Log

Added

Fixed

Changed

  • Improve performance of `ArrayContentDetector`

Removed

Deprecated

Security


Description

Test code from #811

Zrzut ekranu 2023-11-21 o 16 39 06

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 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   | 34.743mb +0.03%  | 682.431ms -2.00% | ±0.13% -86.30% |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.603mb +0.31%   | 295.749ms +0.11% | ±0.51% +30.39% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.767mb +0.20%   | 909.506ms -3.18% | ±0.77% +15.95% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.477mb +0.00% | 1.099s -1.13%    | ±0.48% -55.84% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.560mb -0.07%   | 24.190ms +3.59%  | ±1.73% +72.59% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.560mb -0.07%   | 406.609ms +0.79% | ±0.56% -7.66%  |
+-----------------------+-------------------+------+-----+------------------+------------------+----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.244mb -0.00% | 62.839ms -0.01% | ±1.21% -51.58% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.404mb +0.01%  | 439.828ms -0.00% | ±1.06% -7.90%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.709mb +0.02%  | 70.424ms -3.19%  | ±0.39% -20.23% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 104.986mb +0.01% | 55.760ms -0.28%  | ±1.07% +68.51% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.464mb +0.00% | 1.473s -0.31%    | ±0.20% -84.17% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.587mb +0.06%  | 41.266ms -2.45%  | ±0.81% +46.25% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev           |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.291mb +0.01%  | 2.743ms +27.14%  | ±1.62% +84.45%   |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.082mb +0.01%  | 176.054ms -2.08% | ±0.15% -79.65%   |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.608mb +0.01%  | 17.608ms -2.86%  | ±0.61% -45.36%   |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 75.430mb +2.79%  | 1.735ms +1.74%   | ±2.30% +285.86%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 75.430mb +2.79%  | 1.784ms +8.16%   | ±2.44% +110.88%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.643mb +0.01%  | 2.642ms +2.93%   | ±2.59% +13.44%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.172mb +0.01%  | 14.385ms +1.40%  | ±1.19% +132.35%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.172mb +0.01%  | 14.355ms -0.61%  | ±2.52% +224.00%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.075mb +0.01%  | 1.794μs +5.15%   | ±2.67% -1.89%    |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.075mb +0.01%  | 0.400μs 0.00%    | ±0.00% 0.00%     |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.632mb +0.01%  | 12.632ms +2.91%  | ±0.95% +1443.61% |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 115.991mb +0.00% | 62.481ms -2.74%  | ±2.29% +97.15%   |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.693mb +0.01%  | 1.939ms +4.69%   | ±1.91% +51.69%   |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 77.961mb +0.00%  | 35.184ms +1.20%  | ±2.70% +559.05%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.793mb +0.01%  | 3.897ms -10.86%  | ±0.24% -32.70%   |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.218mb +0.01%  | 38.215ms -0.77%  | ±0.37% -32.76%   |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.219mb +0.01%  | 38.342ms +0.27%  | ±0.21% -72.61%   |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.218mb +0.01%  | 38.464ms +1.19%  | ±0.52% -48.34%   |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.517mb +0.01%  | 7.334ms -0.74%   | ±0.82% -47.15%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.075mb +0.01%  | 28.441ms +0.41%  | ±0.61% -75.89%   |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.075mb +0.01%  | 13.330μs +4.14%  | ±1.75% +37.19%   |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.075mb +0.01%  | 16.412μs +5.93%  | ±0.57% +87.85%   |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.083mb +0.01%  | 180.364ms -2.03% | ±0.76% -35.83%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.171mb +0.00%  | 326.884ms -7.23% | ±0.61% +17.21%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.094mb +0.02%  | 66.556ms -5.73%  | ±2.15% +152.95%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.835mb +0.00% | 375.927ms -4.54% | ±0.72% -56.67%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.553mb +0.01%  | 189.143ms -4.21% | ±0.62% +17.85%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.675mb +0.05%  | 39.747ms -9.79%  | ±0.69% -78.32%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+

@stloyd stloyd requested a review from norberttech November 21, 2023 15:49
@norberttech norberttech merged commit 89a4ce1 into flow-php:1.x Nov 21, 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.

2 participants