Custom PC, Issue 167

Custom PC Issue 167This month’s Custom PC features a look at the effect of compiler optimisation on applications plus reviews of Google’s AIY Voice Kit for the Raspberry Pi family and Jimmy Wilhelmsson’s Generation 64.

The tutorial, to begin, stemmed from investigations I was carrying out into Google’s Guetzli perceptual JPEG encoder. Having cut my teeth in computing back when every byte – never mind kilobyte – really counted, I have a soft-spot for compression both lossy and lossless. Over the years I’ve toyed with a range of compression algorithms, from LZMA and Robert Jung’s ARJ through to the clever if short-lived Fractal Image Format (FIF). Like most, though, I eventually settled on two popular formats for my image compression needs: JPEG where lossy compression is acceptable and PNG where it isn’t.

Guetzli aims to cut the file size of JPEG files by around a third for no apparent loss in perceived image quality. That was enough to pique my interest, but it comes at a cost: a runtime of minutes per megapixel to recompress each image. As an open-source project, Guetzli is provided in source-code form – so I began to play with the optimisation options available in the GNU Compiler Collection (GCC) to see if I couldn’t speed things up.

As readers of my column will discover, I could indeed speed things up – cutting the time taken to compress the small sample image provided with Guetzli from 14.3 seconds using Google’s precompiled binary version down to just 9.56 seconds. Although not an exhaustive guide to compiler optimisation in general nor even GCC-specific options – a topic which would take a book, rather than a couple of magazine pages, to cover adequately – hopefully the write-up of my experiments will help shine a light on the gains that can be made, the potential pitfalls of excessive optimisation, and the benefits of open-source distribution.

The Google AIY Voice Kit, meanwhile, is something quite special: an add-on for the Raspberry Pi family of microcomputers which, in essence, turns them into a somewhat cut-down version of the company’s Google Home voice-activated assistant platform. Initially distributed with The MagPi Magazine as a cover-mounted giveaway, the kit should soon be available for purchase by the general public – and it’s definitely worth seeking one out.

The kit itself centres around a Hardware Attached on Top (HAT) add-on board, which includes servo and motor control, connectivity for an arcade-style button, and links to a break-out board with a pair of MEMS microphones. Combined with some simple software and a link to Google’s cloud computing platform, the AIY Kit can be made to respond to your natural-language queries or even control external hardware via voice recognition – with some major caveats regarding how often you can use it before you need to start handing over cash for the voice recognition platform.

Finally, Generation 64. Originally written in Swedish by Jimmy Wilhelmsson and with design by Kenneth Grönwall, Generation 64 investigates the influence the Commodore 64 had on the Swedish computing scene – complete with an introduction by the founder of Digital Illusions, also known as DICE, and MOS 6502 creator Chuck Peddle. Translated into English and re-released by Bitmap BooksGeneration 64 is an absolutely fantastic read which I would have otherwise missed had it remained untranslated.

Full details on all of these, plus a bunch more stuff written by people who aren’t me, can be found in Custom PC Issue 167 at your nearest supermarket, newsagent, or digitally via Zinio and rival distribution platforms.