Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit...
by codetrotter on Wednesday October 04, 2023 @04:32PM
(#37771300)
In the mentioned https://gitlab.com/cznic/sqlite there would not be any assistant process, right?
[ Parent
| on HN ]
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit...
by jerf on Wednesday October 04, 2023 @04:56PM
(#37771656)
No, but that has the disadvantage of being C compiled into Go, then being compiled into native executable.
I'm actually surprised by how readable this came out; props to the Go->C compiler author. But you can guess that pushing this sort of thing through the Go compiler is going to cause some slowdowns due to sheer paradigm mismatch: https://gitlab.com/cznic/sqlite/-/blob/master/lib/sqlite_lin...
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit...
by throwaway894345 on Wednesday October 04, 2023 @05:24PM
(#37772005)
I don’t think the paradigm is particularly mismatched, right? If you translate C to Go, it would be pretty much best case for Go (neither language likes lots of small allocations). But Go lacks a lot of optimizations that most C compilers support, like return value optimization, aggressive inlining, etc. C also has lighter-weight function calls and so on that you pay for in Go.
Maybe this is what you mean by paradigm mismatch, but usually I would think of something like translating an allocation-heavy Java app into Go as paradigm mismatch.