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

Add TypeFactory, ArrayType, NullType, ResourceType & CallableType #772

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

stloyd
Copy link
Member

@stloyd stloyd commented Nov 8, 2023

Change Log

Added

  • Add `TypeFactory`, `ArrayType` & `NullType`, `ResourceType`, `CallableType`

Fixed

Changed

Removed

Deprecated

Security


Description

Refs #753

Copy link
Contributor

github-actions bot commented Nov 8, 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.271mb -0.01%  | 527.387ms +44.22% | ±0.17% -89.49%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.834mb +0.07%   | 415.203ms +53.36% | ±0.03% -63.64%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.999mb +0.12%   | 836.745ms +45.80% | ±0.31% -65.55%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 233.588mb +0.00% | 1.300s +68.09%    | ±1.71% +29.45%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.828mb +0.07%   | 27.168ms +37.51%  | ±3.40% +145.35% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.828mb +0.07%   | 662.211ms +65.00% | ±0.76% -5.82%   |
+-----------------------+-------------------+------+-----+------------------+-------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+-----------------+------------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak        | mode             | rstdev         |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 87.095mb +0.00% | 78.127ms +62.94% | ±0.93% -14.42% |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode              | rstdev          |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 95.273mb +0.01%  | 916.981ms +56.89% | ±1.16% +61.37%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 46.111mb +0.01%  | 81.683ms +19.97%  | ±0.61% -13.25%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 90.550mb +0.01%  | 89.466ms +44.48%  | ±0.47% -36.85%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 286.021mb +0.00% | 2.042s +57.74%    | ±0.83% +83.66%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.605mb +0.02%  | 42.210ms +4.00%   | ±0.80% +119.51% |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak        | mode              | rstdev          |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 60.704mb +0.01% | 4.832ms +119.68%  | ±1.61% +525.21% |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 80.496mb +0.00% | 212.254ms +39.67% | ±1.50% -8.64%   |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 59.022mb +0.01% | 21.443ms +41.80%  | ±0.41% -29.10%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 59.843mb +0.01% | 3.496ms +95.83%   | ±2.58% +252.41% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 59.843mb +0.01% | 3.695ms +109.15%  | ±1.80% +4.37%   |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 59.056mb +0.01% | 4.904ms +86.12%   | ±3.27% +404.01% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 59.585mb +0.01% | 26.736ms +89.46%  | ±0.58% -21.07%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 59.585mb +0.01% | 26.882ms +89.44%  | ±0.66% -41.95%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 57.656mb +0.01% | 2.800μs +64.11%   | ±2.92% +7.22%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 57.656mb +0.01% | 0.500μs +66.67%   | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 65.889mb +0.01% | 16.556ms +58.31%  | ±1.08% +36.69%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 91.409mb +0.00% | 72.419ms +57.41%  | ±0.12% -89.16%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 60.106mb +0.01% | 3.692ms +85.06%   | ±1.45% -52.80%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 62.376mb +0.01% | 61.950ms +86.98%  | ±3.45% +27.29%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 62.206mb +0.01% | 9.793ms +104.59%  | ±1.19% +93.20%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 57.656mb +0.01% | 66.161ms +78.02%  | ±0.40% +206.35% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 57.656mb +0.01% | 63.361ms +72.99%  | ±1.01% +21.37%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 57.656mb +0.01% | 66.396ms +79.76%  | ±1.72% +159.74% |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 59.930mb +0.01% | 13.279ms +82.75%  | ±1.57% +181.66% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 57.655mb +0.01% | 45.139ms +58.99%  | ±0.32% +8.83%   |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 57.656mb +0.01% | 25.482μs +99.07%  | ±0.56% -12.72%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 57.656mb +0.01% | 31.580μs +103.58% | ±0.54% -11.38%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 80.497mb +0.00% | 213.144ms +36.93% | ±0.26% -0.94%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 93.726mb -0.02% | 202.373ms +67.06% | ±3.30% +79.01%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 48.622mb +0.01% | 92.810ms +49.23%  | ±0.82% -33.13%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 12.641mb +0.08% | 22.167ms +55.05%  | ±0.08% -92.65%  |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+

@github-actions github-actions bot added size: XL and removed size: L labels Nov 8, 2023

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

1 similar comment
Copy link
Contributor

github-actions bot commented Nov 9, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@stloyd stloyd changed the title Add TypeFactory, ArrayType & NullType Add TypeFactory, ArrayType, NullType, ResourceType & CallableType Nov 9, 2023
@stloyd stloyd merged commit 41130ee into flow-php:1.x Nov 9, 2023
17 checks passed
@stloyd stloyd deleted the feature/type-factory branch November 9, 2023 20:14
Copy link
Contributor

github-actions bot commented Nov 9, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

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.

2 participants