compiling100694918orig

Google's Go language takes on compilation speed

Google's open source Go language will improve compilation time with the planned version 1.8 upgrade.

Detailing planned tool chain improvements to Go, contributor Dave Cheney said the 1.8 release, due in February, is projected to improve compilation by an average of 15 percent over Go 1.7. This would help with increased compile times, which have dogged Go lately.

"Since Go 1.5, released in August 2015, compile times have been significantly slower than Go 1.4," Cheney said. "Work on addressing this slowdown started in earnest in the Go 1.7 cycle and is still ongoing." This predicament emerged after the compiler was translated from C to Go.

To improve compilation, the language's parser is being rewritten to make it faster and remove many package level variables inherited from the previous yacc parser. "This parser produces a new abstract syntax tree while the rest of the compiler expects the previous yacc syntax tree," Cheney said. "For 1.8, the new parser must transform its output into the previous syntax tree for consumption by the rest of the compiler." While the parser carries with it an extra transformation step, it is no slower than the previous version; this transformation requirement should be removed in Go 1.9, Cheney said.

To boost code generation, the SSA back end now supports more architectures; it had been rolled out for Intel 64 in Go 1.7. "AMD64, by virtue of being the most popular production architecture, has always been the fastest," said Cheney. Results comparing Go 1.8 to Go 1.7 on Intel architectures show middling improvement driven equally by improvements to code generation, escape analysis improvements, and optimizations to the standard library, according to Cheney. Go 1.8 also will support the 32-bit Mips platform, which was not supported in Go 1.7, and will feature reduced overhead when using the defer statement, which defers the execution of a function until the surrounding function returns.

Go, perhaps best known for its use in development of the Docker container platform, has been a rising star in language popularity.

IDG Insider

PREVIOUS ARTICLE

« Why an iPhone could cost double under Trump

NEXT ARTICLE

Trump appoints critics of net neutrality rules to FCC transition team »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

Trump hits partial pause on Huawei ban, but 5G concerns persist

Phil Muncaster reports on China and beyond

FinancialForce profits from PSA investment

Martin Veitch's inside track on today’s tech trends

Future-proofing the Middle East

Keri Allan looks at the latest trends and technologies

Poll

Do you think your smartphone is making you a workaholic?