[#69616] [Ruby trunk - Feature #11258] add 'x' mode character for O_EXCL — cremno@...
Issue #11258 has been updated by cremno phobia.
3 messages
2015/06/16
[#69643] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — normalperson@...
Issue #11276 has been updated by Eric Wong.
3 messages
2015/06/17
[#69751] [Ruby trunk - Bug #11001] 2.2.1 Segmentation fault in reserve_stack() function. — kubo@...
Issue #11001 has been updated by Takehiro Kubo.
3 messages
2015/06/27
[ruby-core:69713] [Ruby trunk - Feature #11298] [Open] [PATCH] socket: memoize common socket families in fptr->mode
From:
normalperson@...
Date:
2015-06-23 19:18:12 UTC
List:
ruby-core #69713
Issue #11298 has been reported by Eric Wong.
----------------------------------------
Feature #11298: [PATCH] socket: memoize common socket families in fptr->mode
https://bugs.ruby-lang.org/issues/11298
* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee: Akira Tanaka
----------------------------------------
I noticed an unnecesary getsockname() syscalls for every
sendmsg_nonblock call I make on SOCK_SEQPACKET pair.
This made for a noisy strace.
I also plan on following up and setting the flag on
rsock_init_* functions upon initialization.
And probably caching Addrinfo somehow on accepted sockets.
I'll commit this in a week or two if no comments.
~~~
require 'socket'
require 'benchmark'
nr = 100000
msg = 'hello world'
buf = ''
size = msg.bytesize
puts(Benchmark.measure do
UNIXSocket.pair(:SEQPACKET) do |a, b|
nr.times do
a.sendmsg_nonblock(msg, 0, exception: false)
b.recv(size, 0, buf)
end
end
end)
user system total real
before: 0.290000 0.240000 0.530000 ( 0.534527)
after: 0.330000 0.340000 0.670000 ( 0.678235)
~~~
---Files--------------------------------
0001-socket-memoize-common-socket-families-in-fptr-mode.patch (4.95 KB)
--
https://bugs.ruby-lang.org/