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

OpTrait::dataflow_signature should return a Cow #1741

Closed
aborgna-q opened this issue Dec 4, 2024 · 0 comments · Fixed by #1743
Closed

OpTrait::dataflow_signature should return a Cow #1741

aborgna-q opened this issue Dec 4, 2024 · 0 comments · Fixed by #1743
Assignees
Labels
perf Performance issue rust Pull requests that update Rust code

Comments

@aborgna-q
Copy link
Collaborator

Currently it always clones the signature, but for most cases we should be able to avoid that.

@aborgna-q aborgna-q added perf Performance issue rust Pull requests that update Rust code labels Dec 4, 2024
@aborgna-q aborgna-q self-assigned this Dec 6, 2024
@aborgna-q aborgna-q added this to the hugr-rs 0.14 / hugr-py 0.10 milestone Dec 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 10, 2024
```
group                                    cows                                   serialization
-----                                    ----                                   -------------
circuit_roundtrip/capnp/0                1.02      5.3±0.52µs        ? ?/sec    1.00      5.2±0.09µs        ? ?/sec
circuit_roundtrip/capnp/1                1.00     12.5±0.74µs        ? ?/sec    1.14     14.2±0.16µs        ? ?/sec
circuit_roundtrip/capnp/10               1.00     25.9±0.39µs        ? ?/sec    1.31     34.0±0.30µs        ? ?/sec
circuit_roundtrip/capnp/100              1.00    155.8±2.01µs        ? ?/sec    1.47    229.6±2.46µs        ? ?/sec
circuit_roundtrip/capnp/1000             1.00  1483.7±64.06µs        ? ?/sec    1.43      2.1±0.04ms        ? ?/sec
circuit_roundtrip/capnp/10000            1.00     15.9±0.26ms        ? ?/sec    1.49     23.7±1.67ms        ? ?/sec
circuit_roundtrip/capnp/100000           1.00    192.8±2.26ms        ? ?/sec    1.37    264.3±5.44ms        ? ?/sec
circuit_roundtrip/capnp/200000           1.00    411.5±4.77ms        ? ?/sec    1.36   560.4±15.52ms        ? ?/sec
circuit_roundtrip/capnp/300000           1.00    648.9±5.40ms        ? ?/sec    1.34   871.5±10.63ms        ? ?/sec
circuit_roundtrip/json/0                 1.00      8.0±0.18µs        ? ?/sec    1.00      8.0±0.14µs        ? ?/sec
circuit_roundtrip/json/1                 1.00     19.0±0.27µs        ? ?/sec    1.16     22.1±0.33µs        ? ?/sec
circuit_roundtrip/json/10                1.00     50.0±0.68µs        ? ?/sec    1.26     63.0±0.94µs        ? ?/sec
circuit_roundtrip/json/100               1.00    342.5±4.81µs        ? ?/sec    1.30    446.4±4.61µs        ? ?/sec
circuit_roundtrip/json/1000              1.00      3.4±0.03ms        ? ?/sec    1.31      4.5±0.35ms        ? ?/sec
circuit_roundtrip/json/10000             1.00     37.2±0.73ms        ? ?/sec    1.28     47.5±0.45ms        ? ?/sec
circuit_roundtrip/json/100000            1.00    399.3±8.46ms        ? ?/sec    1.27   507.7±16.13ms        ? ?/sec
circuit_roundtrip/json/1000000           1.00       4.5±0.26s        ? ?/sec    1.20       5.4±0.06s        ? ?/sec
``` 

Closes #1741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf Performance issue rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant