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

cmd/compile: evaluate the need for shortcircuit #15512

Open
brtzsnr opened this Issue May 3, 2016 · 1 comment

Comments

Projects
None yet
5 participants
@brtzsnr
Contributor

brtzsnr commented May 3, 2016

For Go1.8

  1. What version of Go are you using (go version)?
    go version devel +097e2c0 Mon May 2 21:02:54 2016 +0000 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    linux/amd64
  3. What did you do?
    ./make.bash & check the size of binaries in pkg/tools/linux_amd64
  4. What did you expect to see?
  5. What did you see instead?

Shortcircuit pass increases the size of the binary by approx 0.04%, but this is not consistent.

with shortcircuit
3244469 addr2line
4909014 api
3982946 asm
3988940 cgo
10647306 compile
4914435 cover
3424419 dist
3825731 doc
2916445 fix
4070497 link
3207010 nm
3532598 objdump
1996235 pack
9308102 pprof
8435425 trace
6246651 vet
2879901 yacc
81530124 total

without shortcircuit
3236277 addr2line
4904918 api
3978850 asm
3993036 cgo // higher
10638988 compile
4906243 cover
3424419 dist
3825731 doc
2916445 fix
4070497 link
3207010 nm
3536694 objdump // higher
1996235 pack
9304006 pprof
8435425 trace
6242555 vet
2875805 yacc
81493134 total

@randall77

This comment has been minimized.

Contributor

randall77 commented May 3, 2016

I originally added shortcircuit to fix some bad generation of && and ||. If we're able to generate reasonable code for those ops without using shortcircuit, then we should get rid of it.

@bradfitz bradfitz added this to the Go1.8 milestone May 4, 2016

@rsc rsc modified the milestones: Go1.9Early, Go1.8 Oct 21, 2016

@bradfitz bradfitz modified the milestones: Go1.10Early, Go1.9Early May 3, 2017

@bradfitz bradfitz added the Performance label May 3, 2017

@bradfitz bradfitz modified the milestones: Go1.10Early, Go1.10 Jun 14, 2017

@bradfitz bradfitz modified the milestones: Go1.10, Go1.11 Nov 28, 2017

@bradfitz bradfitz modified the milestones: Go1.11, Go1.12, Unplanned May 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment