Skip to content

switch var to let in benchmark directory #24011

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

Merged
merged 4 commits into from
May 8, 2019

Conversation

Gumichocopengin8
Copy link
Contributor

I use let instead var.

@Gumichocopengin8
Copy link
Contributor Author

CC: @lorentey Please review this.
Thank you.

@slavapestov
Copy link
Contributor

@swift-ci Please benchmark

@slavapestov
Copy link
Contributor

let and var can generate slightly different code in SILGen... let’s run benchmarks just in case

@swift-ci
Copy link
Contributor

Build failed before running benchmark.

@Gumichocopengin8
Copy link
Contributor Author

@slavapestov
When I run benchmark on my computer, it worked without any errors.
Let me check again

@Gumichocopengin8
Copy link
Contributor Author

@slavapestov
There's no problem on my computer.
Could you please run benchmark again?

@CodaFi
Copy link
Contributor

CodaFi commented Apr 16, 2019

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
FlattenListLoop 4709 4335 -7.9% 1.09x
RemoveWhereSwapInts 70 65 -7.1% 1.08x
MapReduce 426 397 -6.8% 1.07x
MapReduceAnyCollection 426 398 -6.6% 1.07x (?)

Code size: -O

TEST OLD NEW DELTA RATIO
Improvement
main.o 55677 54989 -1.2% 1.01x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@Gumichocopengin8
Copy link
Contributor Author

@CodaFi thanks!

@CodaFi
Copy link
Contributor

CodaFi commented Apr 16, 2019

I can’t remember if the smoke tests check SIL in the benchmarks. May as well get this over with

@swift-ci please test

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6133471

@CodaFi
Copy link
Contributor

CodaFi commented Apr 16, 2019

Somehow benchmark/generate-harness.test-sh failed to complete on the macOS bot. @Gumichocopengin8 I doubt this is your failure, but could you run the tests locally and confirm?

@Gumichocopengin8
Copy link
Contributor Author

@CodaFi
I checked it on my computer.
I also got the error. Do you know how to fix it? I didn't know that changing var causes the error.
Do I need to check all files I changed?

@CodaFi
Copy link
Contributor

CodaFi commented Apr 17, 2019

I think it's because you touched some GYB'd files by mistake. StringWalk notes that it is a generated file, so you should revert your edit there and see if that fixes things. If it does, just change the GYB template.

@Gumichocopengin8
Copy link
Contributor Author

OK thank you

@lorentey
Copy link
Member

@Gumichocopengin8 You'll also need to manually run generate_harness.py to regenerate the .swift files, and commit the resulting changes.

@Gumichocopengin8
Copy link
Contributor Author

@CodaFi @lorentey
Thank you for helping.
I fixed it.

@lorentey
Copy link
Member

@swift-ci test

@lorentey
Copy link
Member

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6133471

@swift-ci
Copy link
Contributor

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
ObjectiveCBridgeStubNSDateRefAccess 371 400 +7.8% 0.93x (?)
Improvement
CharacterLiteralsLarge 108 97 -10.2% 1.11x
ObjectiveCBridgeStubFromNSDateRef 4400 4110 -6.6% 1.07x (?)

Code size: -O

TEST OLD NEW DELTA RATIO
Improvement
main.o 55677 54989 -1.2% 1.01x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@swift-ci

This comment has been minimized.

@Gumichocopengin8
Copy link
Contributor Author

Does it often happen to fail either OS X or Linux?

@lorentey
Copy link
Member

Unrelated failures inevitably happen from time to time if the master branch gets temporarily destabilized. They should be the exception, not the rule, though.

1/1 Test #1: TestFoundation ...................***Exception: Illegal 19.14 sec
[...]
15:55:28 Test Case 'TestNSString.test_substringFromCFString' started at 2019-04-17 20:55:28.461
15:55:28 
15:55:28 
15:55:28 0% tests passed, 1 tests failed out of 1
15:55:28 
15:55:28 Total Test time (real) =  19.14 sec
15:55:28 
15:55:28 The following tests FAILED:
15:55:28 	  1 - TestFoundation (ILLEGAL)

@lorentey
Copy link
Member

@swift-ci please test linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 20b86de

@millenomi
Copy link
Contributor

I am investigating. It is possibly helpful to note that the specific tests that are crashing haven't changed in around a week.

@Gumichocopengin8
Copy link
Contributor Author

@millenomi
The crash probably comes from Driver/working-directory.swift??
When I run test on master branch, I got this
Failing Tests (1): Swift(macosx-x86_64) :: Driver/working-directory.swift
Im not sure tho.

@lorentey
Copy link
Member

@swift-ci smoke test

@Gumichocopengin8
Copy link
Contributor Author

@lorentey @jrose-apple Could you run test please?

@gottesmm
Copy link
Contributor

gottesmm commented May 7, 2019

@Gumichocopengin8 Can you do a rebase instead of a merge?

@lorentey
Copy link
Member

lorentey commented May 7, 2019

We can squash to a single commit at merge time, so we can make do without a rebase here.

@swift-ci please smoke test

@lorentey lorentey merged commit b630380 into swiftlang:master May 8, 2019
@Gumichocopengin8 Gumichocopengin8 deleted the change-var-to-let branch September 2, 2020 05:12
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.

7 participants