FTA:<p><pre><code> // printk emits a single 8-bit character to standard output
//
//go:linkname printk runtime.printk
func printk(c byte)
</code></pre>
So, printing “Hello, world!”, necessarily will have to make 13 calls to this function. I think I would have required a <i>printk</i> that prints an array of bytes. I expect that can be significantly faster on lots of hardware.<p>In contrast, there’s<p><pre><code> // getRandomData generates len(b) random bytes and writes them into b
//
//go:linkname getRandomData runtime.getRandomData
func getRandomData(b []byte)
</code></pre>
Here, they seem to acknowledge that it can be faster to make a single call.