Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Jan 26, 2025

Change Log

Added

Fixed

Changed

  • Improve `Expression::dropDuplicate*Entries` methods

Removed

Deprecated

Security


Description

Cleaner to review without whitespace changes: https://github.com/flow-php/flow/pull/1406/files?w=1

@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           |
+-----------------------+-------------------+------+-----+-----------------+------------------+------------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.773mb +0.00%  | 551.669ms -0.90% | ±1.20% +125.75%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.842mb +0.00%  | 1.075s +1.22%    | ±0.93% +182.11%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.490mb +0.00% | 907.778ms +0.64% | ±2.69% +1604.99% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.503mb +0.01%  | 35.779ms -0.07%  | ±0.11% -85.36%   |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.480mb +0.01%  | 604.168ms -0.40% | ±0.48% +4812.73% |
+-----------------------+-------------------+------+-----+-----------------+------------------+------------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.302mb +0.00% | 69.860ms -2.03% | ±1.01% -14.87% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 63.905mb +0.00%  | 101.090ms -3.78% | ±0.57% +17.06%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.313mb +0.00%  | 95.532ms -4.83%  | ±0.83% +15.03%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 161.207mb +0.00% | 20.624s -0.04%   | ±0.60% +141.07% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.969mb +0.00%  | 29.779ms -4.51%  | ±0.83% +331.14% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.939mb +0.00% | 459.362ms -0.23% | ±0.77% +2.50%   |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.130mb +0.00%  | 229.573ms -1.14% | ±0.87% +47.36%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.652mb +0.00%  | 50.161ms -1.96%  | ±1.07% -19.54%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 96.988mb +0.00%  | 3.152ms -17.57%  | ±1.02% -6.87%   |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.270mb +0.00% | 187.788ms -0.20% | ±0.73% -29.99%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 96.990mb +0.00%  | 19.121ms -1.25%  | ±0.90% -0.54%   |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.863mb +0.00%  | 1.385ms -13.56%  | ±2.44% +184.83% |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.863mb +0.00%  | 1.422ms -16.46%  | ±3.30% +18.29%  |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.023mb +0.00%  | 4.356ms -12.63%  | ±3.45% +180.36% |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.552mb +0.00%  | 16.196ms -1.62%  | ±0.41% +565.32% |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.552mb +0.00%  | 16.193ms -1.13%  | ±1.45% +2.85%   |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.244mb +0.00%  | 1.794μs -5.88%   | ±2.67% +9.43%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.244mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.462mb +0.00% | 14.537ms -0.54%  | ±0.60% -70.15%  |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.529mb +0.00% | 68.338ms -7.61%  | ±1.09% -46.29%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.072mb +0.00%  | 1.276ms -24.59%  | ±0.42% -77.12%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.369mb +0.00% | 64.374ms +0.23%  | ±1.20% +93.05%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.125mb +0.00%  | 3.699ms -7.43%   | ±1.97% -9.99%   |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.532mb +0.00%  | 42.460ms +2.56%  | ±1.47% +184.92% |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.532mb +0.00%  | 42.632ms +1.68%  | ±2.36% +263.55% |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.532mb +0.00%  | 43.500ms +3.50%  | ±0.43% -24.59%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.684mb +0.00%  | 8.197ms -4.53%   | ±0.90% -62.25%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.434mb +0.00%  | 29.217ms -2.65%  | ±1.08% +21.88%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.244mb +0.00%  | 12.880μs -6.96%  | ±1.31% -44.52%  |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.244mb +0.00%  | 15.112μs -4.96%  | ±0.62% -82.69%  |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.271mb +0.00% | 192.463ms +0.43% | ±0.36% -59.36%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 43.777mb +0.00%  | 357.115ms -1.56% | ±0.68% +617.07% |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.587mb +0.00%  | 72.480ms -0.89%  | ±0.82% -18.11%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@stloyd stloyd marked this pull request as ready for review January 26, 2025 08:51
@stloyd stloyd requested a review from norberttech January 26, 2025 08:51
@norberttech norberttech merged commit 10a0c52 into flow-php:1.x Jan 26, 2025
26 checks passed
@norberttech
Copy link
Member

Nice!!

@codecov
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.53%. Comparing base (e8cbd29) to head (770cc89).
Report is 5 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1406      +/-   ##
==========================================
- Coverage   82.55%   82.53%   -0.02%     
==========================================
  Files         654      654              
  Lines       17572    17564       -8     
==========================================
- Hits        14506    14497       -9     
- Misses       3066     3067       +1     
Components Coverage Δ
etl 85.81% <100.00%> (-0.02%) ⬇️
cli 85.17% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 97.36% <ø> (ø)
lib-filesystem 76.23% <ø> (ø)
lib-parquet 84.57% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 90.69% <ø> (-0.47%) ⬇️
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 77.10% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.49% <ø> (ø)
adapter-doctrine 90.14% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 92.85% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 59.88% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)

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