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

Tweak LTO settings on Windows #10668

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Apr 29, 2024

What does this PR do?

Tweak linker optimization flags on Windows

PS C:\bun> ls C:/Users/window/.bun/bin/bun.exe

    Directory: C:\Users\window\.bun\bin

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           4/26/2024  4:09 AM      101468672 bun.exe

PS C:\bun> ls build-release/bun.exe

    Directory: C:\bun\build-release

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           4/29/2024  3:52 PM       95827456 bun.exe
PS C:\bun> hyperfine "C:/bun/build-release/bun.exe  --version"  "C:/Users/window/.bun/bin/bun --version" --warmup=200 --min-runs=200 -N
Benchmark 1: C:/bun/build-release/bun.exe  --version
  Time (mean ± σ):       6.9 ms ±   0.5 ms    [User: 0.6 ms, System: 1.4 ms]
  Range (minmax):     5.9 ms8.4 ms    420 runs

Benchmark 2: C:/Users/window/.bun/bin/bun --version
  Time (mean ± σ):       9.1 ms ±   0.5 ms    [User: 1.1 ms, System: 2.2 ms]
  Range (minmax):     8.0 ms11.0 ms    310 runs

Summary
  C:/bun/build-release/bun.exe  --version ran
    1.33 ± 0.12 times faster than C:/Users/window/.bun/bin/bun --version
PS C:\bun> hyperfine "C:/bun/build-release/bun.exe pm ls"  "C:/Users/window/.bun/bin/bun pm ls" --warmup=200 --min-runs=200 -N
Benchmark 1: C:/bun/build-release/bun.exe pm ls
  Time (mean ± σ):      14.3 ms ±   0.7 ms    [User: 1.3 ms, System: 3.4 ms]
  Range (minmax):    12.6 ms16.4 ms    220 runs

Benchmark 2: C:/Users/window/.bun/bin/bun pm ls
  Time (mean ± σ):      16.0 ms ±   0.8 ms    [User: 1.5 ms, System: 3.4 ms]
  Range (minmax):    13.9 ms19.3 ms    200 runs

Summary
  C:/bun/build-release/bun.exe pm ls ran
    1.12 ± 0.08 times faster than C:/Users/window/.bun/bin/bun pm ls
PS C:\bun> hyperfine "C:/bun/build-release/bun.exe  --print 123"  "C:/Users/window/.bun/bin/bun --print 123" --warmup=200 --min-runs=200 -N
Benchmark 1: C:/bun/build-release/bun.exe  --print 123
  Time (mean ± σ):      34.2 ms ±   1.1 ms    [User: 3.7 ms, System: 6.0 ms]
  Range (minmax):    31.6 ms37.1 ms    200 runs
 
Benchmark 2: C:/Users/window/.bun/bin/bun --print 123
  Time (mean ± σ):      35.2 ms ±   1.2 ms    [User: 5.1 ms, System: 7.5 ms]
  Range (minmax):    32.1 ms38.7 ms    200 runs
 
Summary
  C:/bun/build-release/bun.exe  --print 123 ran
    1.03 ± 0.05 times faster than C:/Users/window/.bun/bin/bun --print 123

How did you verify your code works?

Copy link

github-actions bot commented Apr 30, 2024

@dylan-conway, your commit has failing tests :(

💪 6 failing tests Darwin AARCH64

💻 3 failing tests Darwin x64

🐧🖥 1 failing tests Linux x64 baseline

🪟💻 13 failing tests Windows x64 baseline

🪟💻 18 failing tests Windows x64

View logs

@gvilums
Copy link
Contributor

gvilums commented May 1, 2024

Doesn't build

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