News for hackers. Stuff that matters.
Re:A new experimental Go API for JSON by tptacek on Tuesday September 09, 2025 @02:15PM (#45186068)
What does "highly optimized" have to do with whether it's in the standard library? Highly-optimized cryptography is in the standard library.
Re:A new experimental Go API for JSON by ronsor on Tuesday September 09, 2025 @02:20PM (#45186161)
Not to mention that Go is never going to put C code in the standard library for anything portable. It's all Go or assembly now.
Re:A new experimental Go API for JSON by dwattttt on Tuesday September 09, 2025 @07:57PM (#45191230)
It's amusing to see assembly considered more portable than C.
Re:A new experimental Go API for JSON by jitl on Tuesday September 09, 2025 @09:45PM (#45192065)
No, portable code is written in Go, not C. Platform specific code is written in ASM.
Re:A new experimental Go API for JSON by pjmlp on Wednesday September 10, 2025 @04:31AM (#45194857)
Which is the right approach, and one of the areas I actually appreciate the work of Go authors.

There is nothing special about C, other that its historical availability after UNIX's free beer came to be.

Any combination of high level + Assembly is enough.

Re:A new experimental Go API for JSON by dilyevsky on Tuesday September 09, 2025 @02:59PM (#45186976)
Previously Go team has been vocal about sacrificing performance to keep stdlib idiomatic and readable. Guess the crypto packages are the exception because they are used heavily by Google internally and json and some others (like say image/jpeg which had crap performance last time i checked) are not.

Edit: See: https://go.dev/wiki/AssemblyPolicy

Re:A new experimental Go API for JSON by karel-3d on Wednesday September 10, 2025 @04:59AM (#45195083)
sonic uses a clang-generated ASM, built from C (transformed from normal clang-generated ASM to "weird" go ASM via python script)... I don't think this will be in standard library.