Martin Möhrmann cbc4e5d9c4 cmd/compile: generate makemap calls with int arguments
Where possible generate calls to runtime makemap with int hint argument
during compile time instead of makemap with int64 hint argument.

This eliminates converting the hint argument for calls to makemap with
int64 hint argument for platforms where int64 values do not fit into
an argument of type int.

A similar optimization for makeslice was introduced in CL
golang.org/cl/27851.

386:
name         old time/op    new time/op    delta
NewEmptyMap    53.5ns ± 5%    41.9ns ± 5%  -21.56%  (p=0.000 n=10+10)
NewSmallMap     182ns ± 1%     165ns ± 1%   -8.92%  (p=0.000 n=10+10)

Change-Id: Ibd2b4c57b36f171b173bf7a0602b3a59771e6e44
Reviewed-on: https://go-review.googlesource.com/55142
Reviewed-by: Keith Randall <khr@golang.org>
2017-08-22 20:28:21 +00:00
..
2017-07-08 02:10:12 +00:00
2016-04-03 17:03:15 +00:00
2012-11-08 09:04:27 -08:00
2012-09-10 13:03:07 -07:00
2012-02-16 23:48:57 -05:00
2015-01-29 13:07:30 +00:00
2012-07-01 21:59:50 +04:00
2013-12-12 17:18:12 -08:00
2012-09-28 08:30:30 -07:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2017-08-11 17:41:17 +00:00
2012-10-07 21:52:57 +02:00
2012-02-19 14:28:53 +11:00
2012-02-18 21:18:13 -08:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-19 14:28:53 +11:00
2012-02-24 13:17:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2012-02-23 18:47:26 +11:00
2015-12-17 23:36:13 +00:00
2017-03-21 06:07:24 +00:00
2017-04-05 18:46:31 +00:00
2012-02-23 18:47:26 +11:00
2014-10-27 18:59:02 -04:00
2012-02-23 18:47:26 +11:00
2013-02-11 18:20:52 -05:00
2012-02-24 10:30:39 +11:00
2012-02-24 10:30:39 +11:00
2012-02-24 13:17:26 +11:00
2017-07-26 23:37:25 +00:00
2012-02-24 11:48:19 +11:00
2014-01-29 09:28:23 +01:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00
2012-02-24 11:48:19 +11:00

The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests. They are run as part of all.bash.

To run just these tests, execute:

go run run.go

Standard library tests should be written as regular Go tests in the appropriate package.

The tool chain and runtime also have regular Go tests in their packages. The main reasons to add a new test to this directory are:

  • it is most naturally expressed using the test runner; or
  • it is also applicable to gccgo and other Go tool chains.