Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • number_format expression

Fixed

Changed

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.088mb +0.01%  | 541.148ms +2.80% | ±2.38% -10.67%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 13.973mb +0.02%  | 430.129ms +2.71% | ±2.29% +20.63%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 18.635mb +0.02%  | 846.960ms +3.11% | ±2.89% +314.54% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 237.735mb +0.00% | 1.164s -1.74%    | ±1.24% -33.01%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 7.243mb +0.04%   | 22.841ms +4.18%  | ±0.27% -92.68%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 7.590mb +0.04%   | 802.116ms +9.38% | ±2.58% +56.85%  |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak        | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 87.029mb +0.00% | 82.105ms -0.51% | ±1.66% -48.14% |
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 93.190mb +0.01%  | 839.514ms -2.36% | ±1.22% -21.46% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 47.106mb +0.01%  | 80.997ms -12.53% | ±0.70% -47.88% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 88.540mb +0.00%  | 91.444ms +8.15%  | ±1.64% +3.49%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 281.635mb +0.00% | 1.999s -0.22%    | ±0.69% -68.21% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.528mb +0.02%  | 42.350ms -2.12%  | ±0.34% -88.47% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+-----------------+------------------+----------------+
| benchmark               | subject                    | revs | its | mem_peak        | mode             | rstdev         |
+-------------------------+----------------------------+------+-----+-----------------+------------------+----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 60.653mb +0.00% | 4.954ms +9.95%   | ±1.58% -17.69% |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 80.443mb +0.01% | 211.836ms +0.24% | ±0.38% -76.33% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 58.969mb +0.01% | 21.469ms +3.86%  | ±0.32% -83.50% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 59.792mb +0.00% | 4.029ms +20.70%  | ±0.77% -76.07% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 59.792mb +0.00% | 4.237ms +24.92%  | ±1.99% -33.57% |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 59.005mb +0.00% | 5.182ms +21.77%  | ±1.15% -59.28% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 59.534mb +0.00% | 28.437ms +27.01% | ±3.14% +47.97% |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 59.533mb +0.00% | 28.464ms +25.13% | ±1.18% -19.94% |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 57.605mb +0.01% | 2.806μs +22.00%  | ±1.66% +0.00%  |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 57.605mb +0.01% | 0.500μs 0.00%    | ±0.00% 0.00%   |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 65.838mb +0.00% | 16.540ms -3.67%  | ±3.58% +10.94% |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 91.358mb +0.00% | 73.126ms +2.06%  | ±0.26% -93.46% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 60.054mb +0.00% | 4.290ms +20.44%  | ±3.24% -14.28% |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 62.323mb +0.01% | 56.947ms +15.27% | ±0.10% -91.55% |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 62.155mb +0.00% | 9.476ms +21.82%  | ±1.28% -39.56% |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 57.605mb +0.01% | 61.062ms +14.56% | ±0.55% -79.31% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 57.605mb +0.01% | 61.514ms +11.87% | ±0.19% -87.94% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 57.605mb +0.01% | 62.114ms +10.06% | ±0.19% -81.36% |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 59.879mb +0.00% | 11.230ms +8.63%  | ±0.98% -61.73% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 57.604mb +0.01% | 45.793ms +13.10% | ±0.33% -86.04% |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 57.605mb +0.01% | 25.741μs +2.32%  | ±0.97% -64.22% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 57.605mb +0.01% | 32.060μs -0.81%  | ±1.05% -69.17% |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 80.444mb +0.01% | 214.538ms +6.13% | ±0.46% -15.44% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 91.733mb -0.00% | 176.901ms +1.06% | ±3.00% +18.85% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 47.593mb -0.00% | 89.425ms -6.13%  | ±0.51% -80.95% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 12.380mb +0.02% | 21.285ms +9.54%  | ±0.94% -22.82% |
+-------------------------+----------------------------+------+-----+-----------------+------------------+----------------+

Comment on lines +21 to +23
$decimals = $this->decimals->eval($row);
$decimalSeparator = $this->decimalSeparator->eval($row);
$thousandsSeparator = $this->thousandsSeparator->eval($row);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Micro optim would be to move extract after if that doesn't require it.

@norberttech norberttech merged commit abad3c1 into flow-php:1.x Oct 31, 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.

2 participants