Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Nov 21, 2023

Change Log

Added

Fixed

Changed

  • Improve performance of `Types`

Removed

Deprecated

Security


Description

Test script from #811

Zrzut ekranu 2023-11-21 o 15 50 46

@github-actions
Copy link
Contributor

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.744mb -0.00%  | 699.994ms -37.12% | ±0.53% -53.75%   |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.603mb +0.01%   | 295.536ms -0.61%  | ±0.31% +0.82%    |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.768mb -0.01%   | 937.040ms -30.53% | ±0.22% -80.71%   |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.478mb -0.00% | 1.113s -27.97%    | ±2.43% +1554.59% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.560mb +0.01%   | 23.781ms +3.53%   | ±2.02% -22.43%   |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.560mb +0.01%   | 404.498ms +0.23%  | ±0.23% -51.74%   |
+-----------------------+-------------------+------+-----+------------------+-------------------+------------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.244mb +0.00% | 62.227ms +1.53% | ±1.73% +18.94% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.724mb -0.34%  | 453.666ms +2.64% | ±1.58% +100.36% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.709mb +0.00%  | 71.490ms -1.41%  | ±1.99% +67.98%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.306mb -0.30% | 53.764ms -0.66%  | ±0.72% +6.36%   |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.785mb -0.10% | 1.452s -0.32%    | ±0.38% -69.30%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.587mb +0.00%  | 41.471ms -0.71%  | ±2.07% +339.83% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+-------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode              | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+-------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.291mb +0.00%  | 2.146ms -8.69%    | ±1.77% -35.56%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.082mb +0.00%  | 180.156ms -1.02%  | ±0.57% -19.24%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.608mb +0.00%  | 17.855ms -1.76%   | ±0.67% -21.80%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 75.430mb +0.00%  | 1.616ms -0.22%    | ±0.49% -82.43%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 75.430mb +0.00%  | 1.663ms +1.09%    | ±1.60% +24.94%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.643mb +0.00%  | 2.585ms +2.17%    | ±1.32% -39.00%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.172mb +0.00%  | 14.196ms +0.69%   | ±1.52% +44.77%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.172mb +0.00%  | 14.019ms +0.57%   | ±1.49% -25.75%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.075mb +0.00%  | 1.706μs -5.54%    | ±2.72% +5.77%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.075mb +0.00%  | 0.300μs -25.00%   | ±0.00% -100.00% |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.632mb +0.00%  | 12.419ms +3.27%   | ±2.85% -10.70%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 115.991mb +0.00% | 62.286ms +0.67%   | ±1.39% -17.36%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.693mb +0.00%  | 1.894ms +5.26%    | ±2.60% +311.13% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 77.961mb +0.00%  | 32.797ms -4.49%   | ±0.92% +75.15%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.793mb +0.00%  | 4.385ms +0.72%    | ±0.95% +295.94% |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.218mb +0.00%  | 38.866ms +1.53%   | ±0.93% +85.63%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.219mb +0.00%  | 38.823ms +1.74%   | ±1.00% +292.69% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.218mb +0.00%  | 38.386ms -1.07%   | ±1.43% -30.55%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.517mb +0.00%  | 7.505ms +2.14%    | ±2.12% +5.41%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.075mb +0.00%  | 28.864ms +1.00%   | ±0.58% -21.82%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.075mb +0.00%  | 13.217μs +1.51%   | ±1.65% +71.44%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.075mb +0.00%  | 15.380μs -0.33%   | ±1.10% -27.42%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.083mb +0.00%  | 179.124ms -0.73%  | ±0.63% -14.37%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 98.212mb -39.75% | 359.874ms -61.37% | ±2.27% +122.84% |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 21.903mb -35.65% | 70.871ms -60.97%  | ±1.17% +35.68%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.835mb -0.00% | 401.316ms -45.70% | ±0.40% +263.38% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.553mb -0.00%  | 203.890ms -45.73% | ±0.83% -39.06%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.676mb -0.00%  | 42.707ms -42.44%  | ±1.14% -2.28%   |
+-------------------------+----------------------------+------+-----+------------------+-------------------+-----------------+

@stloyd stloyd requested a review from norberttech November 21, 2023 14:56
@stloyd stloyd merged commit 30bc236 into flow-php:1.x Nov 21, 2023
@stloyd stloyd deleted the chore/array-cont-detect-perf branch November 21, 2023 15:01
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