←back to thread

Show HN: Go Plan9 Memo

(pehringer.info)
302 points pehringer | 1 comments | | HN request time: 0.279s | source

A quick dive into the Plan9 assembly I picked up while developing my SIMD package for Go, and how it led to a 450% performance boost in calculations.
Show context
saclark11 ◴[] No.41880371[source]
> Overall, pretty weird stuff. I am not sure why the Go team went down this route. Maybe it simplifies the compiler by having this bespoke assembly format?

Rob Pike spoke on the design of Go's assembler at a talk in 2016 [1][2]. I think it basically came down to the observation that most assembly language is roughly the same, so why not build a common assembly language that "lets you talk to the machine at the lowest level and yet not have to learn a new syntax." It also enables them to automatically generate a working assembler given an instruction manual PDF for a new architecture as input.

[1]: https://www.youtube.com/watch?v=KINIAgRpkDA [2]: https://go.dev/talks/2016/asm.slide#1

replies(4): >>41880468 #>>41881654 #>>41884035 #>>41886094 #
alphazard ◴[] No.41880468[source]
And it worked. Go established cross-compilation as table-stakes for new programming languages, at a time when very few were doing it well, if at all.
replies(5): >>41880634 #>>41880798 #>>41883225 #>>41883804 #>>41884968 #
pjmlp ◴[] No.41883225[source]
The idea isn't new, for example Amsterdam Compiler Kit from 1980's.
replies(1): >>41884459 #
mech422 ◴[] No.41884459[source]
Ohh...thats a name I haven't heard in a while... along with the purdue compiler construction kit

funny how CLang basically blew right by them in terms of option as a 'base' to build languages on.

replies(2): >>41885911 #>>41886050 #
1. arcticbull ◴[] No.41885911[source]
LLVM -- clang is the C language family front-end to LLVM.