Skip to content
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

Use generic hash algorithm #1122

Merged
merged 6 commits into from
Jul 20, 2024
Merged

Use generic hash algorithm #1122

merged 6 commits into from
Jul 20, 2024

Conversation

mleczakm
Copy link
Contributor

Change Log

Added

  • Generic algorithm abstraction instead of native calls

Fixed

Changed

Removed

Deprecated

Security


Description

Change requested in #1121, fixes that issues.

Copy link
Contributor

github-actions bot commented Jul 20, 2024

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   | 3.916mb -0.05%  | 514.393ms +1.30% | ±0.60% +126.30% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 3.949mb -0.05%  | 1.067s -0.23%    | ±0.75% -75.16%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 28.509mb -0.01% | 430.598ms +3.17% | ±1.75% +55.68%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 3.676mb -0.04%  | 33.451ms -0.15%  | ±1.36% +59.02%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 3.622mb -0.06%  | 438.107ms +1.06% | ±0.58% +53.70%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev        |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 115.968mb -0.00% | 60.862ms +2.05% | ±1.21% +6.25% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+---------------+
Loaders
+--------------------+----------------+------+-----+------------------+-----------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode            | rstdev         |
+--------------------+----------------+------+-----+------------------+-----------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.071mb -0.00%  | 83.130ms +0.57% | ±0.46% -41.73% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 106.503mb -0.00% | 51.652ms +0.74% | ±0.87% -57.87% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 123.785mb -0.00% | 1.228s +0.59%   | ±0.60% -75.28% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.865mb -0.01%  | 44.449ms +3.40% | ±1.53% +32.77% |
+--------------------+----------------+------+-----+------------------+-----------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.697mb +0.00%  | 441.614ms +3.32% | ±2.98% +4.28%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.236mb +0.00%  | 88.422ms +4.13%  | ±2.49% +139.72% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 116.518mb -0.00% | 489.623ms +0.16% | ±0.45% +39.12%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.997mb -0.00%  | 247.143ms +0.53% | ±0.34% -81.48%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.930mb -0.01%  | 53.827ms +1.13%  | ±1.14% +26.17%  |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 86.788mb -0.00%  | 3.451ms +8.36%   | ±0.93% +4.91%   |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 102.386mb -0.00% | 184.452ms -2.74% | ±0.21% -76.59%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 85.106mb -0.00%  | 18.439ms -2.67%  | ±0.94% +35.38%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 88.028mb -0.00%  | 1.846ms +13.00%  | ±1.37% -1.98%   |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 88.028mb -0.00%  | 1.879ms +13.90%  | ±0.82% +70.56%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 85.140mb -0.00%  | 2.830ms +13.15%  | ±1.48% +87.81%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 85.669mb -0.00%  | 16.277ms +1.92%  | ±0.75% -4.69%   |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 85.669mb -0.00%  | 16.314ms +3.77%  | ±0.70% +71.01%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 83.573mb -0.00%  | 1.706μs -4.90%   | ±2.72% +1.92%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 83.573mb -0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 92.923mb -0.00%  | 12.208ms +0.32%  | ±2.21% +8.38%   |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 122.294mb -0.00% | 61.658ms +1.74%  | ±0.50% -10.68%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 86.189mb -0.00%  | 1.468ms +16.64%  | ±2.91% -6.39%   |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 89.534mb -0.00%  | 59.057ms +1.68%  | ±0.29% -73.33%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 88.290mb -0.00%  | 4.010ms +5.11%   | ±0.65% +254.84% |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 83.717mb -0.00%  | 39.093ms -1.84%  | ±1.08% +19.14%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 83.718mb -0.00%  | 40.082ms +2.14%  | ±0.90% +366.26% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 83.717mb -0.00%  | 39.795ms +0.79%  | ±0.62% -2.90%   |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 86.015mb -0.00%  | 7.394ms +1.46%   | ±0.28% -34.97%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 83.573mb -0.00%  | 28.407ms -0.56%  | ±0.65% -46.78%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 83.573mb -0.00%  | 13.741μs +2.81%  | ±1.83% +19.61%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 83.573mb -0.00%  | 16.382μs +4.73%  | ±0.87% -58.55%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 102.387mb -0.00% | 192.494ms -0.13% | ±0.52% -3.05%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@norberttech norberttech merged commit 1a58115 into flow-php:1.x Jul 20, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants