I don't have hard numbers on slowdowns. It will depend a lot on the binary 
in question.
At the time I checked the compiler and linker and it did not slow those 
down (to the accuracy of our benchmarks). The linker particularly is fairly 
read syscall intensive.

We've seen benchmarks that have significant slowdowns though. There was a 
factor of 4 slowdown on 1.12 for a (IMO a not very realistic) http 
benchmark. This wasn't conclusively pinned on the libSystem changes, but it 
seems likely.

On Friday, May 3, 2019 at 4:52:37 PM UTC-7, Ian Lance Taylor wrote:
>
> On Fri, May 3, 2019 at 3:36 PM <ivan.m...@gmail.com <javascript:>> wrote: 
> > 
> > I know that calling C functions via cgo is relatively expensive because 
> of the goroutines, so there must be some optimizations/tricks to make all 
> these libc calls fast. 
>
> Yes, this only uses part of the cgo call path, not all of it.  In 
> particular there's no need to notify the scheduler about these calls 
> (beyond what was already done before this change), just as we don't 
> need to notify the scheduler about all system calls. 
>
> Ian 
>
>
> > On Saturday, May 4, 2019 at 12:21:27 AM UTC+2, ivan.m...@gmail.com 
> wrote: 
> >> 
> >> Indeed, it works with Go 1.12. I have 3 different Go versions, and my 
> aliasing was messed up. Sorry. 
> >> 
> >> > No.  The Linux kernel, fortunately, supports static linking and 
> provides a stable syscall API.  There is no reason to make this change on 
> GNU/Linux. 
> >> 
> >> Good to know, thanks. So Linux, BSD, Plan9 are now the only platforms 
> using raw syscalls. 
> >> 
> >> Last question: did performance drop after the switch? There must be 
> benchmarks. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to golan...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to