Go 1.5 In Beta
Written by Alex Denham   
Tuesday, 21 July 2015

The second beta version of Go 1.5 has been released with the compiler and runtime written entirely in Go.

 

 

Go

 

The release has been moved from the usual six-month interval because of the need for more time to prepare this major release; and to shift the schedule thereafter to time the release dates more conveniently. Despite changes, the developers expect almost all Go programs to continue to compile and run as before, because the release still maintains the Go 1 promise of compatibility.

Under the covers, the main change to the implementation is the rewriting of the compiler and runtime entirely in Go (with a little assembler). C is no longer involved in the implementation, meaning that the C compiler that was until now necessary for building the distribution has been dropped. The release notes for the beta say that the only C source left in the tree is related to testing or to cgo.

In previous versions of the language a C compiler was used to build the runtime, meaning that a custom compiler was necessary in part to guarantee the C code would work with the stack management of goroutines. The compiler was actually moved by automatic translation of the C code into Go, making it in effect the same program in a different language. There’s an overview of the process involved in a presentation given by Google’s Rob Pike at Gopherfest in May.

Another major improvement is to the garbage collector. This is now concurrent and provides dramatically lower pause times by running, when possible, in parallel with other goroutines. The release notes say that expected latencies are much lower than with the collector in prior releases, through a combination of advanced algorithms, better scheduling of the collector, and running more of the collection in parallel with the user program. The "stop the world" phase of the collector will almost always be under 10 milliseconds and usually much less.

Overall changes to performance mainly come from the new garbage collector and the conversion of the runtime to Go, and on average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.5 than they did in Go 1.4. The garbage collector's pauses are dramatically shorter, and almost always under 10 milliseconds. In addition, where you use the defaults, some programs should run faster because GOMAXPROCS is now set by default to the number of cores available; in prior releases it defaulted to 1.

Other improvements include support for internal packages for all repositories in addition to the Go core; experimental support for "vendoring" external dependencies by the go command; a new go tool trace command that supports fine-grained tracing of program execution; and a new go doc command (distinct from godoc) that is customized for command-line use.

The binary and source distributions are available on the Golang site.

 

 

goicon1

Banner


Open Source Key To Expansion of IoT & Edge
13/03/2024

According to the 2023 Eclipse IoT & Edge Commercial Adoption Survey Report, last year saw a surge of IoT adoption among commercial organizations across a wide range of industries. Open source [ ... ]



Bun Shell Released
29/02/2024

The developers of the Bun JavaScript runtime have released Bun Shell, a new experimental embedded language and interpreter in Bun that lets you run cross-platform shell scripts in JavaScript and TypeS [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 21 July 2015 )