Go programming language release 1.15

Submitted by programming language release Go 1.15, which is developed by Google with the participation of the community as a hybrid solution that combines the high performance of compiled languages ​​​​with the advantages of scripting languages ​​\uXNUMXb\uXNUMXbsuch as ease of writing code, speed of development, and error protection. Project code spreads under the BSD license.

The syntax of Go is based on the familiar elements of the C language with some borrowings from the Python language. The language is quite concise, but the code is easy to read and understand. Go code is compiled into standalone binary executable files that run natively without using a virtual machine (profiling, debugging, and other run-time problem detection subsystems are integrated as runtime components), which allows you to achieve performance comparable to programs in the C language.

The project is initially developed with an eye on multi-threaded programming and efficient operation on multi-core systems, including providing means implemented at the operator level for organizing parallel computing and interaction between parallelly executed methods. The language also provides built-in protection against overruns of allocated memory blocks and provides the ability to use the garbage collector.

All innovations, introduced in the Go 1.15 release:

  • The performance of the linker has been significantly improved, both in the area of ​​increasing speed and reducing memory consumption, and in the direction of simplifying code maintenance. When tested on operating systems that use the ELF executable file format (Linux, FreeBSD, NetBSD, OpenBSD, Dragonfly, Solaris), linking a typical set of large Go applications was 20% faster, and memory consumption was reduced by an average of 30%. The performance improvement was made possible by the transition to a new object file format and the redesign of internal stages to increase the level of parallelization of work. Native linker is now used by default on linux/amd64 and linux/arm64 systems in "-buildmode=pie" mode, which no longer requires C-linker.
  • At runtime, the distribution of small objects on systems with a large number of CPU cores has been significantly improved and latency has been reduced. On failures, the output of values ​​with numeric and string types is provided, instead of showing the address. When sending SIGSEGV, SIGBUS, and SIGFPE signals to a Go application, if there is no os/signal.Notify handler, the application will exit with a stack trace (previously unpredictable behavior).
  • The compiler has been optimized to reduce the size of generated executable files by an average of 5% by removing some metadata from the garbage collector and more aggressively cleaning up unused metadata.
  • The "-spectre" flag has been added to the compiler and assembler to enable protection against Specter class attacks (it is not required for most programs, enabling the option can only be justified for some very specific cases).
  • X.509 certificates have deprecated the CommonName field, which is no longer treated as a hostname if the Subject Alternative Names field is missing.
  • In the "go" command, in the GOPROXY environment variable, you can now list multiple proxies, separated by a comma or the "|" symbol. If the first proxy in the list returns an error (404 or 410), then an attempt will be made to contact through the second proxy, and so on.
  • Added warning to vet about attempting to convert from string(x) if "x" is an integer type other than rune or byte.
  • The "-gnu" flag has been added to the objdump utility to support disassembly of the GNU assembler syntax.
  • New package added time/tzdata, which allows you to embed a database with time zone data into the program.
  • From sources and documentation removed whitelist/blacklist and master/slave phrases, which are now replaced by "allowlist", "blocklist", "process", "pty", "proc" and "control".
  • A large portion of minor improvements have been made to the standard library.
  • Added support for OpenBSD 6.7 in GOARCH=arm and GOARCH=arm64 modes (previously only GOARCH=386 and GOARCH=amd64 were supported).
  • Continued development of the 64-bit RISC-V platform (GOOS=linux, GOARCH=riscv64).
  • For 32-bit x86 systems, the minimum system requirements will be raised in the next release to continue to support only processors with SSE2. To build in GOARCH=386 mode, you need at least an Intel Pentium 4 (released in 2000) or an AMD Opteron/Athlon 64 (released in 2003).

Source: opennet.ru

Add a comment