3 ms·
It seems its mostly written in assembly? I'd be worried about portability, maintainability, and security. I'd be way more comfortable if it was written in C, o
by TheMagicHorsey 5y ago
It seems its mostly written in assembly? I'd be worried about portability, maintainability, and security.
I'd be way more comfortable if it was written in C, or better yet Rust.
- scottlamb 5y agoIt sounds like it essentially is written in C. INTRODUCTION.md says: > As for insufficiency in compiling optimization of go language, we decided to use C/Clang to write and compile core computational functions, and developed a set of asm2asm tools to translate the fully optimized x86 assembly into plan9 and finally load it into Golang runtime. Github says it's 59.6% assembly and 6.5% C. Possibly the assembly is just the checked-in result of compiling+translating the C? Gross that they have to do this. I know the Go folks really prioritize speed of compilation, but I wish they'd support debug builds with their own backend and release builds with LLVM so you could get this kind of performance when actually writing Go. I see there have been a few attempts at Go + general-purpose backend (gccgo, llgo, gollvm) but none seem to use the official Go frontend written in Go, so I think they're doomed to be second-class at best. edit: and/or, if the Go folks and GCC and/or LLVM coulds could negotiate a shared ABI (not necessarily switching to the platform's default C ABI but having "cc --abi=special-golang-stack-copying-thing"), folks could just link against something compiled in C/Rust/whatever without requiring this separate compilation+translation step (the high-maintenance, high-performance path) or CGo overhead (the easy but slow-for-frequent-calls path).
- latchkey 5y agoI really don't care what language it is written in. As long as there is full test coverage, I'm happy. I've been a long time user of jsoniter and it is much faster than the standard lib. It really makes a difference for the work I do. If this is even faster and has tests, even better.
- mastax 5y agoUsing Go assembly lets you avoid the Cgo overhead IIRC.