Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] mingw: emulate write(2) that fails with a EPIPE

From: Johannes Schindelin <hidden>
Date: 2016-06-15 23:07:30

Hi Junio,

On Thu, 17 Dec 2015, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help