Skip to content

Dremel & Parquet performance improvements#862

Merged
norberttech merged 1 commit intoflow-php:1.xfrom
norberttech:performance/dremel
Dec 3, 2023
Merged

Dremel & Parquet performance improvements#862
norberttech merged 1 commit intoflow-php:1.xfrom
norberttech:performance/dremel

Conversation

@norberttech
Copy link
Member

Change Log

Added

Fixed

  • Dremel & Parquet performance improvements

Changed

Removed

Deprecated

Security


Description

Profiling:

Before
After

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 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.123mb +0.00%  | 711.168ms +1.29% | ±2.41% +62.75%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.822mb +0.01%   | 302.082ms +0.13% | ±0.32% +170.83% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.920mb +0.01%   | 934.940ms +2.06% | ±0.32% -19.76%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.626mb +0.00% | 1.126s +1.63%    | ±0.28% -57.39%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.699mb +0.01%   | 24.820ms +0.40%  | ±0.07% -95.22%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.700mb +0.01%   | 407.981ms -0.27% | ±0.14% -92.85%  |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.386mb +0.00% | 65.139ms +2.29% | ±2.11% +137.99% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.784mb +0.00%  | 444.697ms -2.91% | ±1.98% +54.59%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.862mb +0.00%  | 71.688ms -0.12%  | ±0.27% -53.13%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.445mb +0.00% | 58.582ms +3.18%  | ±1.29% +315.07% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.654mb +0.00% | 1.288s -13.57%   | ±2.10% +9.01%   |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.739mb +0.00%  | 41.777ms +0.98%  | ±0.35% +1.06%   |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev           |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.436mb +0.00%  | 3.251ms +18.04%  | ±2.84% +103.60%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.229mb +0.00%  | 184.619ms -3.44% | ±0.67% -43.67%   |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.755mb +0.00%  | 19.148ms -0.95%  | ±2.59% +44.73%   |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.676mb +0.00%  | 1.900ms +12.86%  | ±1.84% +1907.38% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.676mb +0.00%  | 1.934ms +14.30%  | ±1.34% +2576.14% |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.789mb +0.00%  | 2.934ms +11.69%  | ±0.04% -98.04%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.318mb +0.00%  | 15.582ms +2.71%  | ±1.37% -24.42%   |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.318mb +0.00%  | 15.133ms +2.78%  | ±0.54% -64.08%   |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.220mb +0.00%  | 2.000μs +5.60%   | ±0.00% -100.00%  |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.220mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%     |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.777mb +0.00%  | 14.136ms +11.21% | ±2.03% -16.84%   |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.137mb +0.00% | 65.199ms +4.02%  | ±0.82% -22.35%   |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.838mb +0.00%  | 1.934ms +4.22%   | ±2.31% +213.55%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 78.111mb +0.00%  | 35.180ms +3.97%  | ±0.71% -25.19%   |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.939mb +0.00%  | 4.356ms +11.04%  | ±1.38% -18.70%   |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.366mb +0.00%  | 41.362ms +1.89%  | ±0.53% -42.66%   |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.366mb +0.00%  | 41.005ms +2.74%  | ±3.11% +36.47%   |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.366mb +0.00%  | 42.849ms +3.79%  | ±2.10% +31.43%   |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.663mb +0.00%  | 7.978ms +5.82%   | ±3.19% +76.81%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.220mb +0.00%  | 29.347ms +1.58%  | ±1.51% +107.81%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.220mb +0.00%  | 13.830μs +4.13%  | ±1.69% +57.52%   |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.220mb +0.00%  | 16.606μs +4.44%  | ±0.28% -72.41%   |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.231mb +0.00%  | 181.672ms -3.34% | ±0.47% -67.11%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.381mb +0.00%  | 335.529ms -0.70% | ±1.77% +70.95%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.304mb +0.00%  | 68.289ms +2.71%  | ±1.20% -20.52%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.979mb +0.00% | 381.116ms -3.71% | ±0.64% -61.86%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.697mb +0.00%  | 191.766ms -0.59% | ±0.89% -71.14%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.822mb +0.00%  | 41.873ms +2.07%  | ±1.19% -24.52%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+

@norberttech norberttech merged commit 085d8b3 into flow-php:1.x Dec 3, 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