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

Partial evaluation support for return expressions #1421

Merged
merged 10 commits into from
Apr 29, 2024

Conversation

cesarzc
Copy link
Contributor

@cesarzc cesarzc commented Apr 24, 2024

This change implements support for return expressions in partial evaluation.

@cesarzc cesarzc mentioned this pull request Apr 24, 2024
64 tasks
Copy link

Benchmark for 82d91c0

Click to view benchmark
Test Base PR %
Array append evaluation 340.7±4.58µs 336.5±2.61µs -1.23%
Array literal evaluation 199.2±1.65µs 177.5±6.57µs -10.89%
Array update evaluation 425.1±1.68µs 417.6±2.59µs -1.76%
Core + Standard library compilation 19.1±1.44ms 17.0±0.50ms -10.99%
Deutsch-Jozsa evaluation 5.0±0.04ms 5.0±0.04ms 0.00%
Large file parity evaluation 33.6±0.09ms 33.7±0.39ms +0.30%
Large input file compilation 12.2±0.46ms 11.4±0.22ms -6.56%
Large input file compilation (interpreter) 50.7±2.26ms 48.0±2.13ms -5.33%
Large nested iteration 33.8±0.19ms 33.0±1.08ms -2.37%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1524.7±129.14µs 1500.2±33.91µs -1.61%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.8±0.11ms 7.9±0.12ms +1.28%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1462.7±132.99µs 1414.0±31.91µs -3.33%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 22.2±0.54ms 21.5±0.67ms -3.15%
Teleport evaluation 80.8±4.33µs 81.3±7.08µs +0.62%

@cesarzc cesarzc force-pushed the cesarzc/partial-eval-returns branch from 16de5b2 to bfe0819 Compare April 24, 2024 23:29
@cesarzc cesarzc marked this pull request as ready for review April 24, 2024 23:30
Copy link

Benchmark for 80468e6

Click to view benchmark
Test Base PR %
Array append evaluation 342.6±2.60µs 338.4±1.74µs -1.23%
Array literal evaluation 196.3±1.61µs 199.3±1.66µs +1.53%
Array update evaluation 423.0±2.41µs 424.8±5.24µs +0.43%
Core + Standard library compilation 17.0±0.28ms 17.2±0.42ms +1.18%
Deutsch-Jozsa evaluation 5.0±0.06ms 5.1±0.06ms +2.00%
Large file parity evaluation 33.6±0.12ms 33.6±0.57ms 0.00%
Large input file compilation 11.4±0.17ms 11.6±0.20ms +1.75%
Large input file compilation (interpreter) 45.4±1.31ms 45.5±1.51ms +0.22%
Large nested iteration 33.2±0.11ms 33.0±0.15ms -0.60%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1497.1±30.88µs 1505.0±33.72µs +0.53%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.8±0.09ms 7.8±0.08ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1412.5±34.11µs 1417.3±44.74µs +0.34%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.3±0.19ms 21.4±0.67ms +0.47%
Teleport evaluation 80.2±4.14µs 83.8±3.99µs +4.49%

compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
Copy link

Benchmark for 4e49e50

Click to view benchmark
Test Base PR %
Array append evaluation 335.5±1.40µs 333.6±3.62µs -0.57%
Array literal evaluation 170.7±2.02µs 174.2±4.34µs +2.05%
Array update evaluation 417.1±1.93µs 420.3±9.48µs +0.77%
Core + Standard library compilation 17.0±0.40ms 17.0±0.34ms 0.00%
Deutsch-Jozsa evaluation 5.0±0.04ms 5.1±0.05ms +2.00%
Large file parity evaluation 33.6±0.13ms 33.5±0.25ms -0.30%
Large input file compilation 11.5±0.19ms 11.4±0.16ms -0.87%
Large input file compilation (interpreter) 45.1±1.44ms 45.3±1.65ms +0.44%
Large nested iteration 32.8±0.27ms 32.7±0.28ms -0.30%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1509.1±58.65µs 1493.5±29.12µs -1.03%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.13ms 7.7±0.10ms -2.53%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1410.8±40.96µs 1405.9±29.90µs -0.35%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.4±0.55ms 21.3±0.33ms -0.47%
Teleport evaluation 80.3±4.07µs 81.9±3.72µs +1.99%

Copy link

Benchmark for 1cd531c

Click to view benchmark
Test Base PR %
Array append evaluation 334.8±1.13µs 347.6±3.35µs +3.82%
Array literal evaluation 172.2±1.99µs 189.4±6.29µs +9.99%
Array update evaluation 417.0±1.25µs 427.9±2.73µs +2.61%
Core + Standard library compilation 16.6±0.04ms 16.7±0.29ms +0.60%
Deutsch-Jozsa evaluation 5.0±0.04ms 5.1±0.23ms +2.00%
Large file parity evaluation 33.5±0.16ms 33.6±0.27ms +0.30%
Large input file compilation 11.3±0.06ms 11.2±0.11ms -0.88%
Large input file compilation (interpreter) 43.2±1.11ms 43.0±1.06ms -0.46%
Large nested iteration 32.9±0.83ms 35.1±0.46ms +6.69%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1490.2±40.93µs 1492.0±42.59µs +0.12%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.7±0.10ms 7.6±0.08ms -1.30%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1403.0±25.34µs 1399.6±25.21µs -0.24%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.1±0.30ms 21.1±0.26ms 0.00%
Teleport evaluation 80.4±4.55µs 81.0±4.86µs +0.75%

Copy link

Benchmark for 61cdee1

Click to view benchmark
Test Base PR %
Array append evaluation 336.6±2.02µs 341.6±9.50µs +1.49%
Array literal evaluation 173.8±1.52µs 173.3±1.35µs -0.29%
Array update evaluation 417.5±1.72µs 419.9±11.65µs +0.57%
Core + Standard library compilation 16.7±0.06ms 16.7±0.08ms 0.00%
Deutsch-Jozsa evaluation 5.0±0.05ms 5.1±0.05ms +2.00%
Large file parity evaluation 33.5±0.10ms 33.5±0.17ms 0.00%
Large input file compilation 11.2±0.08ms 11.1±0.16ms -0.89%
Large input file compilation (interpreter) 43.4±1.31ms 43.3±1.09ms -0.23%
Large nested iteration 32.8±0.29ms 32.9±0.41ms +0.30%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1498.1±26.83µs 1488.7±27.63µs -0.63%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.7±0.08ms 7.7±0.07ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1412.3±50.69µs 1403.0±27.80µs -0.66%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.2±0.18ms 21.1±0.14ms -0.47%
Teleport evaluation 80.9±6.72µs 82.1±6.94µs +1.48%

Copy link

Benchmark for 80a5ef5

Click to view benchmark
Test Base PR %
Array append evaluation 335.9±2.96µs 333.7±1.65µs -0.65%
Array literal evaluation 175.3±4.14µs 173.1±1.05µs -1.25%
Array update evaluation 417.2±1.83µs 411.8±1.69µs -1.29%
Core + Standard library compilation 16.8±0.12ms 16.7±0.22ms -0.60%
Deutsch-Jozsa evaluation 5.0±0.04ms 5.1±0.15ms +2.00%
Large file parity evaluation 33.5±0.12ms 33.7±0.37ms +0.60%
Large input file compilation 11.4±0.18ms 11.2±0.16ms -1.75%
Large input file compilation (interpreter) 44.3±1.26ms 44.0±1.21ms -0.68%
Large nested iteration 32.7±0.11ms 32.5±0.17ms -0.61%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1499.0±30.12µs 1498.8±31.98µs -0.01%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.7±0.07ms 7.7±0.08ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1409.4±28.79µs 1405.6±26.02µs -0.27%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.2±0.37ms 21.2±0.21ms 0.00%
Teleport evaluation 80.3±4.09µs 80.6±4.02µs +0.37%

@cesarzc cesarzc added this pull request to the merge queue Apr 29, 2024
Merged via the queue into main with commit 0c92116 Apr 29, 2024
17 checks passed
@cesarzc cesarzc deleted the cesarzc/partial-eval-returns branch April 29, 2024 20:47
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.

3 participants