4 ms·
The one pathological case of kinda-slow Go compilation I have involves embedding a very big binary blob (FPGA firmware for a controller chip driving a Texas Ins
by georgemcbay 14y ago
The one pathological case of kinda-slow Go compilation I have involves embedding a very big binary blob (FPGA firmware for a controller chip driving a Texas Instruments DMD array) as a const array of bytes that I can just dump down the usb connection when cold booting the device. I don't fault Go for this as I'm really abusing the language to simplify my single-file deployment without having to do too much work for the simple deploy.
If I wanted to spend the time I could do something like append the blob to the end of the program executable instead of just clumsily jamming it into DATA, but this all exists in a library that doesn't need to change often so the fact that it takes ~10-15 seconds to compile is not a problem in practice.
- krasin 14y agoI would suggest to file an issue: https://code.google.com/p/go/issues/list https://code.google.com/p/go/issues/list At least, Go team will be aware of your pathological case and have a chance to speed up it.
- agentS 14y agoI vaguely remembered minux suggesting a way to do this more efficiently, and dug it up: golang.org/issue/3035 Maybe it'll work for your use case.
- georgemcbay 14y agoWow, that (the syso linker thing) is very useful and should work out well in my case, thanks.