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

Formatter: Remove Unauthoritative Newlines #1303

Merged
merged 13 commits into from
Mar 26, 2024
Merged

Formatter: Remove Unauthoritative Newlines #1303

merged 13 commits into from
Mar 26, 2024

Conversation

ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Mar 24, 2024

Removes unauthoritative newlines from the formatter, ensuring that all newlines are strictly enforced between either a single style or one of several well-defined styles.
This PR also contains all the formatted Samples and Libraries Q# files.

Copy link

Change in memory usage detected by benchmark.

Memory Report for 3fe761e

Test This Branch On Main
compile core + standard lib 15969841 bytes 15971017 bytes

Copy link

Change in memory usage detected by benchmark.

Memory Report for 4d93cad

Test This Branch On Main
compile core + standard lib 15969841 bytes 15971017 bytes

Copy link

Benchmark for 4d93cad

Click to view benchmark
Test Base PR %
Array append evaluation 334.6±2.49µs 330.0±5.34µs -1.37%
Array literal evaluation 177.0±1.31µs 198.8±5.67µs +12.32%
Array update evaluation 418.7±2.85µs 415.5±19.61µs -0.76%
Deutsch-Jozsa evaluation 5.2±0.05ms 5.3±0.06ms +1.92%
Large file parity evaluation 33.7±0.07ms 33.7±0.34ms 0.00%
Large input file 31.1±1.41ms 31.4±1.39ms +0.96%
Large nested iteration 32.9±0.58ms 32.4±0.39ms -1.52%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1551.3±81.33µs 1555.4±96.57µs +0.26%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.8±0.08ms 7.8±0.08ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1473.7±84.98µs 1548.7±127.50µs +5.09%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 25.9±0.20ms 25.9±0.50ms 0.00%
Standard library 17.0±0.39ms 16.9±0.36ms -0.59%
Teleport evaluation 81.4±3.99µs 82.2±4.05µs +0.98%

Copy link

Change in memory usage detected by benchmark.

Memory Report for 19ca37b

Test This Branch On Main
compile core + standard lib 15969977 bytes 15971017 bytes

Copy link

Benchmark for 19ca37b

Click to view benchmark
Test Base PR %
Array append evaluation 329.3±2.87µs 339.3±1.89µs +3.04%
Array literal evaluation 197.8±5.20µs 180.0±1.60µs -9.00%
Array update evaluation 412.5±2.78µs 421.2±11.70µs +2.11%
Deutsch-Jozsa evaluation 5.3±0.31ms 5.3±0.06ms 0.00%
Large file parity evaluation 33.8±0.08ms 33.8±0.10ms 0.00%
Large input file 33.3±0.62ms 32.5±1.43ms -2.40%
Large nested iteration 32.1±0.23ms 32.8±0.54ms +2.18%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1588.9±170.22µs 1579.6±106.04µs -0.59%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.11ms 7.9±0.11ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1512.0±121.46µs 1496.7±93.62µs -1.01%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 26.0±0.17ms 25.9±0.29ms -0.38%
Standard library 17.7±0.68ms 17.9±0.64ms +1.13%
Teleport evaluation 83.1±6.95µs 83.5±5.01µs +0.48%

Copy link

Change in memory usage detected by benchmark.

Memory Report for e956af8

Test This Branch On Main
compile core + standard lib 15969977 bytes 15971017 bytes

Copy link

Benchmark for e956af8

Click to view benchmark
Test Base PR %
Array append evaluation 346.2±1.77µs 344.2±1.74µs -0.58%
Array literal evaluation 173.7±1.05µs 174.0±1.09µs +0.17%
Array update evaluation 426.0±1.73µs 428.1±3.08µs +0.49%
Deutsch-Jozsa evaluation 5.3±0.05ms 5.4±0.06ms +1.89%
Large file parity evaluation 33.5±0.08ms 33.6±0.56ms +0.30%
Large input file 34.1±1.05ms 30.8±1.30ms -9.68%
Large nested iteration 33.6±0.72ms 33.4±0.42ms -0.60%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1595.1±102.35µs 1564.5±88.37µs -1.92%
Perform Runtime Capabilities Analysis (RCA) on large file sample 8.0±0.13ms 7.7±0.09ms -3.75%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1545.7±147.07µs 1512.6±87.24µs -2.14%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 26.4±0.37ms 25.7±0.20ms -2.65%
Standard library 18.3±0.79ms 16.9±0.90ms -7.65%
Teleport evaluation 84.2±4.02µs 83.0±4.58µs -1.43%

Copy link

Change in memory usage detected by benchmark.

Memory Report for bdc9c4e

Test This Branch On Main
compile core + standard lib 15969977 bytes 15971017 bytes

Copy link

Benchmark for bdc9c4e

Click to view benchmark
Test Base PR %
Array append evaluation 334.4±7.89µs 339.0±14.22µs +1.38%
Array literal evaluation 176.5±3.03µs 177.4±3.69µs +0.51%
Array update evaluation 416.7±2.01µs 425.0±37.70µs +1.99%
Deutsch-Jozsa evaluation 5.3±0.05ms 5.3±0.32ms 0.00%
Large file parity evaluation 33.8±0.09ms 34.0±0.38ms +0.59%
Large input file 33.6±0.80ms 34.0±0.64ms +1.19%
Large nested iteration 32.9±1.15ms 33.4±2.82ms +1.52%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1571.1±120.85µs 1612.3±139.88µs +2.62%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.8±0.39ms 7.9±0.09ms +1.28%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1498.7±122.71µs 1539.1±161.25µs +2.70%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 26.3±0.68ms 27.2±1.01ms +3.42%
Standard library 18.1±1.04ms 20.0±1.27ms +10.50%
Teleport evaluation 81.6±4.00µs 82.6±6.26µs +1.23%

@ScottCarda-MS ScottCarda-MS changed the title Sccarda/temp Formatter: Remove Unauthoritative Newlines Mar 25, 2024
@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review March 25, 2024 18:05
@ScottCarda-MS ScottCarda-MS mentioned this pull request Mar 25, 2024
Copy link
Contributor

@DmitryVasilevsky DmitryVasilevsky left a comment

Choose a reason for hiding this comment

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

Approving library part with comments.

library/std/math.qs Outdated Show resolved Hide resolved
format_all.ps1 Outdated Show resolved Hide resolved
Copy link
Member

@minestarks minestarks left a comment

Choose a reason for hiding this comment

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

Very satisfying to see all the ad-hoc formatting standardized in the libraries! Definite improvement IMO.

I don't have an opinion either way on the subjective calls (e.g. spaces around certain binary operators).

Just a couple of requests, will sign off when those are addressed.

Copy link

Change in memory usage detected by benchmark.

Memory Report for 740789d

Test This Branch On Main
compile core + standard lib 15969649 bytes 15970257 bytes

Copy link

Benchmark for 740789d

Click to view benchmark
Test Base PR %
Array append evaluation 396.4±5.28µs 325.9±2.02µs -17.79%
Array literal evaluation 195.8±0.61µs 197.0±5.81µs +0.61%
Array update evaluation 483.6±4.14µs 412.7±2.86µs -14.66%
Deutsch-Jozsa evaluation 5.3±0.07ms 5.1±0.04ms -3.77%
Large file parity evaluation 34.1±0.84ms 33.8±0.51ms -0.88%
Large input file 31.2±0.68ms 31.3±0.78ms +0.32%
Large nested iteration 40.1±0.35ms 32.1±0.12ms -19.95%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1590.8±89.53µs 1578.2±82.64µs -0.79%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.07ms 7.8±0.15ms -1.27%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1513.0±81.17µs 1542.8±150.25µs +1.97%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.5±0.18ms 21.6±0.21ms +0.47%
Standard library 17.0±0.28ms 17.4±1.23ms +2.35%
Teleport evaluation 86.4±4.91µs 82.7±4.08µs -4.28%

Copy link

Change in memory usage detected by benchmark.

Memory Report for 6b38c18

Test This Branch On Main
compile core + standard lib 15969577 bytes 15970257 bytes

Copy link

Benchmark for 6b38c18

Click to view benchmark
Test Base PR %
Array append evaluation 330.4±2.18µs 332.1±2.50µs +0.51%
Array literal evaluation 177.3±1.79µs 176.9±4.41µs -0.23%
Array update evaluation 417.6±7.97µs 416.5±2.21µs -0.26%
Deutsch-Jozsa evaluation 5.1±0.06ms 5.1±0.05ms 0.00%
Large file parity evaluation 33.9±0.13ms 33.8±0.11ms -0.29%
Large input file 33.1±1.36ms 33.5±1.43ms +1.21%
Large nested iteration 32.9±0.57ms 32.7±0.17ms -0.61%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1584.7±86.32µs 1613.0±103.87µs +1.79%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.12ms 7.9±0.12ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1510.7±69.16µs 1543.4±159.52µs +2.16%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 21.8±0.30ms 21.8±0.40ms 0.00%
Standard library 18.1±0.80ms 17.9±1.13ms -1.10%
Teleport evaluation 82.8±4.23µs 82.5±4.79µs -0.36%

Copy link

Change in memory usage detected by benchmark.

Memory Report for cf6cf17

Test This Branch On Main
compile core + standard lib 15969577 bytes 15970257 bytes

Copy link

Benchmark for cf6cf17

Click to view benchmark
Test Base PR %
Array append evaluation 334.7±2.15µs 333.0±5.35µs -0.51%
Array literal evaluation 177.3±2.83µs 176.1±0.84µs -0.68%
Array update evaluation 417.7±1.44µs 418.9±5.70µs +0.29%
Deutsch-Jozsa evaluation 5.0±0.05ms 5.1±0.09ms +2.00%
Large file parity evaluation 33.8±0.15ms 33.9±0.28ms +0.30%
Large input file 32.3±1.17ms 32.4±1.36ms +0.31%
Large nested iteration 32.9±0.17ms 32.7±0.44ms -0.61%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1589.3±131.14µs 1594.6±83.98µs +0.33%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.10ms 7.8±0.09ms -1.27%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1511.1±89.32µs 1511.1±104.57µs 0.00%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 22.0±0.19ms 21.5±0.25ms -2.27%
Standard library 17.3±0.50ms 16.9±0.31ms -2.31%
Teleport evaluation 81.2±4.07µs 83.6±5.76µs +2.96%

@ScottCarda-MS ScottCarda-MS added this pull request to the merge queue Mar 26, 2024
Merged via the queue into main with commit 19dcfa5 Mar 26, 2024
16 checks passed
@ScottCarda-MS ScottCarda-MS deleted the sccarda/temp branch March 26, 2024 18:36
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

3 participants