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

test: comprehensive testing of narrowing binary operations #9607

Open
davecheney opened this issue Jan 15, 2015 · 3 comments

Comments

@davecheney
Copy link
Contributor

commented Jan 15, 2015

#9604 highlighted that more testing of narrowing binary operations is required.

@davecheney davecheney added this to the Go1.5 milestone Jan 15, 2015

@gopherbot gopherbot closed this in c3b459d Jan 17, 2015

@randall77

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2015

Reopening for minux to add more tests.

@randall77 randall77 reopened this Jan 17, 2015

@minux

This comment has been minimized.

Copy link
Member

commented Jan 18, 2015

I wrote a trivial extension of your code. it works, but 6g takes a huge
amount
of memory to compile the resulting program.

6.92user 0.47system 0:07.38elapsed 100%CPU (0avgtext+0avgdata
1916388maxresident)k
0inputs+89560outputs (0major+483391minor)pagefaults 0swaps

I'm using the multiple init() trick, but it seems that is not enough.

Some interesting statistics:

  1. all in the same function:
    7.28user 0.55system 0:07.83elapsed, 1965620K MSS
  2. each typecast in a different init():
    7.30user 0.59system 0:07.89elapsed, 1900004K MSS
  3. each test type (unary, binary, shift) for each type cast in different
    init():
    6.92user 0.47system 0:07.38elapsed, 1916388K MSS

Because gc always keeps every toplevel function in memory, so splitting the
functions
will not help reducing memory requirements much.

We still need to split the test into smaller pieces, like the rotate tests.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

Too late for Go 1.5.

@rsc rsc modified the milestones: Unplanned, Go1.5 Jun 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.