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

Make SpreadZ utility iterative instead of recursive #1545

Merged
merged 3 commits into from
May 21, 2024

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented May 20, 2024

This updates the internal utility for SpreadZ as used by Microsoft.Quantum.Intrinsic.Exp to use an iterative algorith rather than recursive. This allows Exp to be used when generating QIR adaptive profile code, where RCA rejects call cycles.

This updates the internal utility for `SpreadZ` as used by `Microsoft.Quantum.Intrinsic.Exp` to use an iterative algorith rather than recursive. This allows `Exp` to be used when generating QIR adaptive profile code, where RCA rejects call cycles.
Copy link

Change in memory usage detected by benchmark.

Memory Report for 74a3b48

Test This Branch On Main Difference
compile core + standard lib 16619501 bytes 16582941 bytes 36560 bytes

Copy link

Change in memory usage detected by benchmark.

Memory Report for 7a5ea2d

Test This Branch On Main Difference
compile core + standard lib 16619429 bytes 16582941 bytes 36488 bytes

Copy link

Benchmark for 7a5ea2d

Click to view benchmark
Test Base PR %
Array append evaluation 328.2±2.72µs 323.5±2.93µs -1.43%
Array literal evaluation 189.4±1.17µs 171.1±0.86µs -9.66%
Array update evaluation 410.8±2.78µs 407.8±2.40µs -0.73%
Core + Standard library compilation 18.3±0.08ms 18.4±0.06ms +0.55%
Deutsch-Jozsa evaluation 5.1±0.06ms 5.1±0.08ms 0.00%
Large file parity evaluation 34.1±0.09ms 34.1±0.45ms 0.00%
Large input file compilation 12.2±0.26ms 12.6±0.45ms +3.28%
Large input file compilation (interpreter) 45.7±0.85ms 46.6±1.69ms +1.97%
Large nested iteration 32.8±0.98ms 32.3±0.48ms -1.52%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1549.6±33.23µs 1554.1±36.60µs +0.29%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.7±0.10ms 7.7±0.06ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1413.0±30.24µs 1412.0±27.97µs -0.07%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 27.1±0.17ms 27.8±0.36ms +2.58%
Teleport evaluation 88.8±4.01µs 89.5±3.72µs +0.79%

Copy link

Change in memory usage detected by benchmark.

Memory Report for 3a2f08f

Test This Branch On Main Difference
compile core + standard lib 16619429 bytes 16582941 bytes 36488 bytes

@swernli swernli marked this pull request as ready for review May 20, 2024 21:00
Copy link

Benchmark for 3a2f08f

Click to view benchmark
Test Base PR %
Array append evaluation 330.3±3.51µs 324.4±2.71µs -1.79%
Array literal evaluation 192.1±0.72µs 171.4±4.25µs -10.78%
Array update evaluation 408.1±3.52µs 405.3±2.97µs -0.69%
Core + Standard library compilation 18.8±0.30ms 19.3±0.71ms +2.66%
Deutsch-Jozsa evaluation 5.0±0.05ms 5.0±0.21ms 0.00%
Large file parity evaluation 34.2±0.08ms 34.1±0.11ms -0.29%
Large input file compilation 12.5±0.14ms 12.5±0.15ms 0.00%
Large input file compilation (interpreter) 47.7±1.28ms 47.4±0.83ms -0.63%
Large nested iteration 32.6±0.25ms 32.5±1.62ms -0.31%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1652.3±239.81µs 1551.9±39.20µs -6.08%
Perform Runtime Capabilities Analysis (RCA) on large file sample 8.2±1.18ms 7.9±0.07ms -3.66%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1547.8±293.29µs 1414.0±33.70µs -8.64%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 27.5±0.20ms 28.1±0.20ms +2.18%
Teleport evaluation 89.4±3.89µs 87.4±4.02µs -2.24%

@swernli swernli enabled auto-merge May 21, 2024 17:50
@swernli swernli added this pull request to the merge queue May 21, 2024
Merged via the queue into main with commit 8f00e81 May 21, 2024
16 checks passed
@swernli swernli deleted the swernli/flatten-spreadz branch May 21, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants