Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Oct 31, 2023

Change Log

Added

Fixed

Changed

  • Reduce a bit randomness in `NativeEntryFactoryBench`

Removed

Deprecated

Security


Description

@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   | 44.120mb +0.00%  | 501.759ms +17.62% | ±0.45% -8.21%   |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 14.005mb +0.00%  | 403.413ms +19.75% | ±2.92% +382.11% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 18.667mb +0.00%  | 749.380ms +15.28% | ±1.29% +184.57% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 237.768mb +0.00% | 1.093s +21.26%    | ±0.55% +199.55% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 7.275mb +0.00%   | 19.277ms +3.48%   | ±3.49% +331.95% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 7.622mb +0.00%   | 679.970ms +20.41% | ±0.80% +15.83%  |
+-----------------------+-------------------+------+-----+------------------+-------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 87.061mb +0.00% | 74.261ms +17.83% | ±0.37% +478.38% |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode              | rstdev          |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 93.222mb +0.00%  | 799.658ms +20.96% | ±1.89% +532.28% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 47.138mb +0.00%  | 88.782ms +22.54%  | ±1.80% -12.60%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 88.572mb +0.00%  | 81.926ms +23.22%  | ±3.46% +416.48% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 281.204mb +0.00% | 1.076s +11.42%    | ±1.11% +166.34% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.560mb +0.00%  | 39.859ms +9.84%   | ±2.76% +343.49% |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+-----------------+-------------------+------------------+
| benchmark               | subject                    | revs | its | mem_peak        | mode              | rstdev           |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+------------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 60.685mb +0.00% | 4.093ms +25.36%   | ±2.76% +481.02%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 80.475mb +0.00% | 206.340ms +16.14% | ±1.02% +749.75%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 59.001mb +0.00% | 20.008ms +11.40%  | ±0.67% +125.26%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 59.824mb +0.00% | 2.923ms +6.04%    | ±1.53% -14.17%   |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 59.824mb +0.00% | 2.843ms +5.66%    | ±2.83% +164.84%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 59.037mb +0.00% | 3.808ms +1.49%    | ±0.67% -71.87%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 59.566mb +0.00% | 22.089ms +26.68%  | ±1.03% +45.53%   |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 59.565mb +0.00% | 24.165ms +36.70%  | ±1.96% +302.28%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 57.637mb +0.00% | 2.306μs +4.83%    | ±2.02% -45.56%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 57.637mb +0.00% | 0.400μs -20.00%   | ±0.00% +0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 65.870mb +0.00% | 15.026ms +12.22%  | ±2.08% +17.15%   |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 91.390mb +0.00% | 68.858ms +19.13%  | ±1.59% +127.09%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 60.086mb +0.00% | 3.201ms +13.38%   | ±1.84% +201.93%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 62.355mb +0.00% | 46.172ms +20.16%  | ±1.89% +602.74%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 62.187mb +0.00% | 7.839ms +17.89%   | ±2.79% +46.98%   |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 57.637mb +0.00% | 54.286ms +19.50%  | ±2.81% +5457.40% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 57.637mb +0.00% | 56.922ms +24.86%  | ±2.21% +2873.06% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 57.637mb +0.00% | 55.243ms +20.58%  | ±2.25% +2028.32% |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 59.911mb +0.00% | 10.527ms +10.27%  | ±3.54% +42.00%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 57.636mb +0.00% | 40.223ms +12.13%  | ±1.32% +1060.17% |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 57.637mb +0.00% | 27.139μs +31.18%  | ±1.75% +39.27%   |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 57.637mb +0.00% | 31.997μs +23.01%  | ±2.33% +542.96%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 80.476mb +0.00% | 200.201ms +13.21% | ±1.96% +1328.40% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 91.830mb -0.09% | 177.351ms +24.10% | ±1.12% +976.83%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 47.628mb -0.02% | 90.411ms +23.86%  | ±1.86% +179.31%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 12.417mb +0.01% | 20.595ms +19.29%  | ±2.13% +539.01%  |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+------------------+

@stloyd stloyd merged commit 3606821 into flow-php:1.x Oct 31, 2023
@stloyd stloyd deleted the chore/native-bench branch October 31, 2023 11:58
@norberttech
Copy link
Member

rstdev is still super high, I think that instead of making those small adjustments we should just generate a static data once and remove the faker entirely

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