Hacker News new | past | comments | ask | show | jobs | submit login

In the mentioned https://gitlab.com/cznic/sqlite there would not be any assistant process, right?



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...


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: