From: Johannes Schindelin Date: Thu, 17 Dec 2015 17:08:08 GMT Subject: Re: [PATCH] mingw: emulate write(2) that fails with a EPIPE Message-ID: In-Reply-To: Hi Junio, On Thu, 17 Dec 2015, Junio C Hamano wrote: > Johannes Schindelin writes: > > > My intuition (which I honestly did not verify using performance tests) was > > that write() is called *much* more often than, say, open(),... > > My gut feeling agrees with yours, but I do not think the frequency > at which write() is called should be the primary factor when you > decide to make its wrapper inlined. Once you call write(2), you > will hit either the disk or the network doing I/O, and at that point > I'd expect that the cost of making an extra layer of wrapper call > would be lost in the noise. I'd worry a lot more about from how > many callsites write() is called---by inlining the extra code that > is run only when the underlying write(2) returns an error to many > callsites, we would make the program as a whole bigger, and as the > result other code needs to be evicted out of the instruction cache, > which also would hurt performance. That argument convinced me. v2 coming shortly. Ciao, Dscho