News for hackers. Stuff that matters.
Re:Show HN: Strife, a 2D game library for Go by pcwalton on Saturday September 29, 2018 @12:38PM (#18101268)
The biggest problem with doing CPU-intensive work in Go is not the latency of the GC but rather the lack of maturity of the optimization pipeline compared to GCC and LLVM, the lack of good support for things like SIMD, the relatively poor throughput of the GC, the large overhead of cgo (which matters quite a lot for graphics!), etc.
Re:Show HN: Strife, a 2D game library for Go by andy_ppp on Saturday September 29, 2018 @12:53PM (#18101375)
I didn’t realise that Go didn’t use LLVM when Swift a much complex language uses it. Is there any specific reason for Go not using LLVM.
Re:Show HN: Strife, a 2D game library for Go by pcwalton on Saturday September 29, 2018 @01:04PM (#18101454)
The reason the Go developers cited is fast compile times, as well as the belief that LLVM is "too big". I don't agree with these: LLVM compile times are fine for ahead-of-time compilation, and LLVM is big because it does important things.

I do have mixed feelings about LLVM for safe GC'd languages, though. LLVM is full of undefined behavior, and its support for precise moving tracing GC is not widely used. So I can definitely sympathize with not wanting to use LLVM for Go, but not for the reasons they cited.

Re:Show HN: Strife, a 2D game library for Go by gameswithgo on Saturday September 29, 2018 @01:15PM (#18101526)
>LLVM compile times are fine

What constitutes 'fine' depends on workflow, size of project, machine horsepower, and personal preference. Some projects require a bit more compile -> experiment -> change -> compile -> experiment -> change than others.

Re:Show HN: Strife, a 2D game library for Go by polityagent on Saturday September 29, 2018 @04:26PM (#18102608)
I would recommend a language with a repl for that kind of project
Re:Show HN: Strife, a 2D game library for Go by mattnewton on Saturday September 29, 2018 @12:58PM (#18101417)
The Go FAQ says they are working on it, and they mention the difficultly making some changes from C conventions leading them to not use it initially. https://golang.org/doc/faq#What_compiler_technology_is_used_...
Re:Show HN: Strife, a 2D game library for Go by gameswithgo on Saturday September 29, 2018 @12:56PM (#18101401)
fast compile times is a core value for Go would be one reason.
Re:Show HN: Strife, a 2D game library for Go by galangalalgol on Saturday September 29, 2018 @01:43PM (#18101680)
Its my understanding that the throughput was intentionally sacrificed for low GC pause times.
Re:Show HN: Strife, a 2D game library for Go by pcwalton on Saturday September 29, 2018 @02:27PM (#18101937)
Correct. That is not the decision I would have made, and it's especially relevant for CPU-intensive workloads.