-
-
Notifications
You must be signed in to change notification settings - Fork 48
Remove redundant transformer function eval #1417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
norberttech
merged 5 commits into
flow-php:1.x
from
christianc1:fix/redundant-transformer-fn-eval
Jan 29, 2025
Merged
Remove redundant transformer function eval #1417
norberttech
merged 5 commits into
flow-php:1.x
from
christianc1:fix/redundant-transformer-fn-eval
Jan 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Flow PHP - BenchmarksResults 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.783mb +0.01% | 559.630ms -3.80% | ±0.45% -83.47% |
| JsonExtractorBench | bench_extract_10k | 1 | 3 | 4.857mb +0.01% | 1.072s +1.61% | ±0.30% -79.24% |
| ParquetExtractorBench | bench_extract_10k | 1 | 3 | 86.297mb +0.00% | 920.000ms +1.90% | ±0.57% +58.01% |
| TextExtractorBench | bench_extract_10k | 1 | 3 | 4.514mb +0.01% | 35.306ms +0.41% | ±0.81% +121.01% |
| XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.488mb +0.01% | 606.605ms +0.86% | ±0.86% -69.76% |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 127.310mb +0.00% | 71.412ms -0.33% | ±0.93% +10.47% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench | bench_load_10k | 1 | 3 | 63.981mb +0.00% | 103.227ms -2.55% | ±0.21% -62.45% |
| JsonLoaderBench | bench_load_10k | 1 | 3 | 84.328mb +0.00% | 97.862ms -0.75% | ±0.23% -78.19% |
| ParquetLoaderBench | bench_load_10k | 1 | 3 | 161.169mb +0.00% | 20.564s -0.50% | ±0.37% +159.10% |
| TextLoaderBench | bench_load_10k | 1 | 3 | 17.980mb +0.00% | 31.157ms -1.14% | ±0.94% +13.70% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 105.953mb +0.00% | 445.835ms -1.93% | ±1.69% +151.18% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 55.143mb +0.00% | 229.052ms -2.05% | ±1.09% +50.86% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 14.665mb +0.00% | 50.043ms -1.82% | ±1.24% +44.11% |
| RowsBench | bench_chunk_10_on_10k | 2 | 3 | 96.996mb +0.00% | 3.225ms -8.79% | ±0.24% -90.83% |
| RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 114.278mb +0.00% | 188.458ms +0.53% | ±0.64% -29.74% |
| RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 96.998mb +0.00% | 19.062ms -0.39% | ±2.40% +114.89% |
| RowsBench | bench_drop_1k_on_10k | 2 | 3 | 97.871mb +0.00% | 1.687ms -6.92% | ±1.03% -65.64% |
| RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 97.871mb +0.00% | 1.476ms -29.13% | ±2.76% +110.26% |
| RowsBench | bench_entries_on_10k | 2 | 3 | 96.032mb +0.00% | 4.541ms -11.78% | ±2.23% +25.74% |
| RowsBench | bench_filter_on_10k | 2 | 3 | 96.561mb +0.00% | 16.409ms -3.13% | ±0.51% -25.20% |
| RowsBench | bench_find_on_10k | 2 | 3 | 96.561mb +0.00% | 16.481ms -2.45% | ±1.44% +145.44% |
| RowsBench | bench_find_one_on_10k | 10 | 3 | 95.252mb +0.00% | 1.706μs -14.95% | ±2.72% +17.31% |
| RowsBench | bench_first_on_10k | 10 | 3 | 95.252mb +0.00% | 0.300μs -25.00% | ±0.00% -100.00% |
| RowsBench | bench_flat_map_on_1k | 2 | 3 | 104.470mb +0.00% | 14.549ms -2.68% | ±0.52% -74.22% |
| RowsBench | bench_map_on_10k | 2 | 3 | 134.537mb +0.00% | 71.609ms -1.56% | ±0.90% -31.74% |
| RowsBench | bench_merge_1k_on_10k | 2 | 3 | 97.080mb +0.00% | 1.374ms -15.08% | ±3.59% +34.56% |
| RowsBench | bench_partition_by_on_10k | 2 | 3 | 100.378mb +0.00% | 64.212ms -1.94% | ±0.44% -87.77% |
| RowsBench | bench_remove_on_10k | 2 | 3 | 98.133mb +0.00% | 3.752ms -2.67% | ±1.02% -21.33% |
| RowsBench | bench_sort_asc_on_1k | 2 | 3 | 95.540mb +0.00% | 41.433ms -3.94% | ±0.70% +91.73% |
| RowsBench | bench_sort_by_on_1k | 2 | 3 | 95.540mb +0.00% | 41.903ms -4.83% | ±1.32% +43.82% |
| RowsBench | bench_sort_desc_on_1k | 2 | 3 | 95.540mb +0.00% | 42.378ms -5.26% | ±1.12% -26.23% |
| RowsBench | bench_sort_entries_on_1k | 2 | 3 | 97.692mb +0.00% | 8.289ms +0.40% | ±0.38% -66.37% |
| RowsBench | bench_sort_on_1k | 2 | 3 | 95.442mb +0.00% | 29.552ms -0.03% | ±1.03% +291.33% |
| RowsBench | bench_take_1k_on_10k | 10 | 3 | 95.252mb +0.00% | 14.345μs +6.79% | ±3.01% -0.67% |
| RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 95.252mb +0.00% | 15.694μs +3.33% | ±0.30% -51.70% |
| RowsBench | bench_unique_on_1k | 2 | 3 | 114.279mb +0.00% | 192.957ms +1.21% | ±0.69% -4.43% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 43.788mb +0.00% | 360.317ms -0.30% | ±0.43% -43.68% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 11.598mb +0.00% | 73.698ms +1.69% | ±0.26% -50.81% |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 1.x #1417 +/- ##
=======================================
Coverage 82.89% 82.89%
=======================================
Files 655 655
Lines 17522 17521 -1
=======================================
Hits 14524 14524
+ Misses 2998 2997 -1
|
Member
|
thank you @christianc1! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Log
Fixed
Description
Fixed an issue where ScalarFunctionTransformers were evaluating their underlying transformer functions twice unnecessarily.