summaryrefslogtreecommitdiff
path: root/ChangeLog
AgeCommit message (Collapse)Author
2015-11-17socket (bsock_recvmsg_internal): avoid arg parsingnormal
* ext/socket/ancdata.c (bsock_recvmsg_internal): avoid arg parsing (rsock_bsock_recvmsg): adjust for above change (rsock_bsock_recvmsg_nonblock): ditto [ruby-core:71439] [Feature #11339] * ext/socket/rubysocket.h: adjust prototypes for above * ext/socket/basicsocket.c (rsock_init_basicsocket): adjust private methods * ext/socket/lib/socket.rb (BasicSocket#recvmsg): wrapper method (BasicSocket#recvmsg_nonblock): ditto target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux] ----------------------------------------------------------- recvmsg_nonblock require 'socket' nr = 1_000_000 i = 0 msg = '.' buf = '.' begin r, w = UNIXSocket.pair(:SEQPACKET) while i < nr i += 1 w.sendmsg(msg) r.recvmsg_nonblock(1, exception: false) end ensure r.close w.close end ----------------------------------------------------------- raw data: [["recvmsg_nonblock", [[3.721687912940979, 3.6072621569037437, 3.580637402832508, 3.614185404032469, 3.6029579415917397], [2.4694008752703667, 2.4908322244882584, 2.5051278844475746, 2.5037173740565777, 2.548359278589487]]]] Elapsed time: 30.646087052 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b recvmsg_nonblock 3.581 2.469 Speedup ratio: compare with the result of `a' (greater is better) name b recvmsg_nonblock 1.450 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: avoid arg parsing in rsock_s_accept_nonblocknormal
* ext/socket/init.c (rsock_s_accept_nonblock): avoid parsing args [ruby-core:71439] [Feature #11339] * ext/socket/rubysocket.h: adjust prototype * ext/socket/socket.c (sock_accept_nonblock): make private * ext/socket/tcpserver.c (tcp_accept_nonblock): ditto * ext/socket/unixserver.c (unix_accept_nonblock): ditto * ext/socket/lib/socket.rb (Socket#accept_nonblock): implement as wrapper, move RDoc (TCPServer#accept_nonblock): ditto (UNIXServer#accept_nonblock): ditto target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux] ----------------------------------------------------------- accept_nonblock require 'tempfile' require 'socket' require 'io/wait' nr = 500000 Tempfile.create(%w(accept_nonblock .sock)) do |tmp| path = tmp.path File.unlink(path) s = UNIXServer.new(path) addr = Socket.sockaddr_un(path).freeze nr.times do s.accept_nonblock(exception: false) c = UNIXSocket.new(path) s.wait_readable s.accept_nonblock(exception: false).close c.close end end ----------------------------------------------------------- raw data: [["accept_nonblock", [[4.807877402752638, 4.930681671947241, 4.738454818725586, 4.69268161803484, 4.684675686061382], [4.253904823213816, 4.255124930292368, 4.295955188572407, 4.248479191213846, 4.213303029537201]]]] Elapsed time: 45.123040065 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b accept_nonblock 4.685 4.213 Speedup ratio: compare with the result of `a' (greater is better) name b accept_nonblock 1.112 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: Socket#connect_nonblock avoids arg parsing with C APInormal
* ext/socket/socket.c (sock_connect_nonblock): avoid argument parsing in C. [ruby-core:71439] [Feature #11339] * ext/socket/lib/socket.rb (Socket#connect_nonblock): new wrapper for private method, move RDoc target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52540) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52540) [x86_64-linux] ----------------------------------------------------------- connect_nonblock require 'tempfile' require 'socket' require 'io/wait' nr = 500000 Tempfile.create(%w(connect_nonblock .sock)) do |tmp| path = tmp.path File.unlink(path) s = UNIXServer.new(path) addr = Socket.sockaddr_un(path).freeze nr.times do c = Socket.new(Socket::AF_UNIX, Socket::SOCK_STREAM) while c.connect_nonblock(addr, exception: false) == :wait_writable c.wait_writable end s.accept.close c.close end end ----------------------------------------------------------- raw data: [["connect_nonblock", [[4.014209181070328, 3.8479955345392227, 3.981342639774084, 4.471840236335993, 3.7867715656757355], [3.639054525643587, 3.58337214961648, 3.525284394621849, 3.52646067738533, 3.511393066495657]]]] Elapsed time: 37.889623996 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b connect_nonblock 3.787 3.511 Speedup ratio: compare with the result of `a' (greater is better) name b connect_nonblock 1.078 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: avoid arg parsing in rsock_s_recvfrom_nonblocknormal
* ext/socket/init.c (rsock_s_recvfrom_nonblock): avoid arg parsing with C API [ruby-core:71439] [Feature #11339] * ext/socket/basicsocket.c (bsock_recv_nonblock): adjust for above change, make private * ext/socket/socket.c (sock_recvfrom_nonblock): ditto * ext/socket/udpsocket.c (udp_recvfrom_nonblock): ditto * ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): new wrapper for private method, move RDoc (Socket#recvfrom_nonblock): ditto (UDPSocket#recvfrom_nonblock): ditto Note, not adding bm_recv_nonblock.rb to benchmark/ directory since it is non-portable. It is only in this commit message. Benchmark results + code target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52540) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52540) [x86_64-linux] ----------------------------------------------------------- recv_nonblock require 'socket' nr = 1000000 msg = 'hello world' buf = '' size = msg.bytesize UNIXSocket.pair(:SEQPACKET) do |a, b| nr.times do a.sendmsg(msg) b.recv_nonblock(size, 0, buf, exception: false) end end ----------------------------------------------------------- raw data: [["recv_nonblock", [[1.83511221408844, 1.8703329525887966, 1.8448856547474861, 1.859263762831688, 1.8331583738327026], [1.5637447573244572, 1.4062932096421719, 1.4247371144592762, 1.4108827747404575, 1.4802536629140377]]]] Elapsed time: 16.530452496 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b recv_nonblock 1.833 1.406 Speedup ratio: compare with the result of `a' (greater is better) name b recv_nonblock 1.304 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* test/dtrace/helper.rb (Dtrace::TestCase#trap_probe): dtrace buffer size is ↵ngoto
set as 8m on Solaris (default 4m). [Bug #11697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16struct.c: dignobu
* object.c (rb_obj_dig): dig in nested structs too. * struct.c (rb_struct_dig): new method Struct#dig. [Feature #11688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16compile.c: tailcall on aref and asetnobu
* compile.c (iseq_peephole_optimize): optimize tail calls on aref and aset specialized instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16compile.c: optimize leavenobu
* compile.c (iseq_peephole_optimize): optimize replaced leave instruction copied to jump instruction too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* lib/set.rb: Enable frozen_string_literal.knu
* lib/set.rb: Move << out of the begin block that ensures pop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* lib/set.rb (Hash#flatten!, #add?, #delete?, #collect!, #reject!,knu
#select!, #^, #classify): Micro-optimize some methods for performance and readability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* ChangeLog: fixed accidentally commit.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* mkconfig.rb: Add some high-level documentation.hsbt
[ci skip][fix GH-1081] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* proc.c: Add call-seq of `Method#super_method`hsbt
[ci skip][fix GH-1094] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* struct.c: Standardize a method signature of Struct#[]=.hsbt
[ci skip][fix GH-1095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* lib/set.rb (#>=, #>, #<=, #<): Make use of Hash#>=, #>, #<, andknu
#<= when comparing against an instance of the same kind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* tool/rbinstall.rb: fix wrong permission for gem specification withouthsbt
zlib runtime. [Bug #11685][ruby-dev:49343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* lib/webrick/httpauth/basicauth.rb: fix a typo.hsbt
[ci skip][fix GH-1099] Patch by @jwworth * lib/webrick/httpauth/digestauth.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-15vm_method.c: check if frozen [Fix GH-1096]nobu
* vm_method.c (set_method_visibility): should fail if the receiver is frozen. [ruby-core:71489] [Bug #11687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* ext/socket/lib/socket.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/time.rb: Use "<<" to reduce string allocation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/tsort.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/resolv-replace.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/time.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/open3.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* node.h: remove old comments.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* refactoring CREF related code.ko1
* eval_intern.h: remove unused setter functions. CREF_CLASS_SET() CREF_NEXT_SET() CREF_SCOPE_VISI_COPY() * eval_intern.h: rename flags: * NODE_FL_CREF_PUSHED_BY_EVAL_ -> CREF_FL_PUSHED_BY_EVAL * NODE_FL_CREF_OMOD_SHARED_ -> CREF_FL_OMOD_SHARED and use IMEMO_FL_USER1/2. * vm.c (vm_cref_new): accept push_by_eval parameter. * vm.c (vm_cref_new_use_prev): added for rb_vm_rewrite_cref(). * vm_insnhelper.c (vm_cref_push): accept pushed_by_eval parameter. * vm_insnhelper.h: remove unused macros: COPY_CREF_OMOD() and COPY_CREF(). * vm_eval.c, insns.def: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* vm.c (vm_define_method): refactoring.ko1
* get CREF in this function. * cbase is no longer needed (CREF_CLASS(cref) is enough). * compile.c: RubyVM::FrozenCore.define_method only accept 2 args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* vm.c (vm_define_method): do not use current CREF immediately,ko1
but check CREF in environment or methods. Methods defined in methods should be public. [Bug #11571] * vm_method.c (rb_scope_module_func_check): check CREF in env or me. if CREF is contained by `me', then return FALSE. * test/ruby/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* method.h: constify rb_cref_t::scope_visi;ko1
* eval_intern.h (CREF_SCOPE_VISI_COPY): catch up this fix. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround forngoto
optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13Unset LD_PRELOAD on mingwshirosaki
* configure.in: unset LD_PRELOAD on mingw. msys2 child processes crash at make test-all with LD_PRELOAD. [ruby-core:71461] [Bug #11680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* ext/openssl/ossl_ssl.c: Merge ruby/openssl@81e1a30zzak
* test/openssl/test_ssl.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13prelude.rb: deprecate Thread.exclusivenobu
* prelude.rb (Thread.exclusive): warn as deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13parse.y: optimize condition for unlessnobu
* parse.y (new_unless): optimize constant condition for `unless` as well as `if`. [Fix GH-1092] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* ext/psych/psych.gemspec: bump version to 2.0.15hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12parse.y: exact magic comment namenobu
* parse.y (parser_magic_comment): should match exactly. [ruby-core:71460] [Bug #11679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12prelude.c.tmpl: optimizenobu
* template/prelude.c.tmpl: enable tail call optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12parse.y: ANDDOT fluent interfacenobu
* parse.y (parser_yylex): ANDDOT at the head of the line denote line continuation from previous one to support fluent interface, as well as single dot. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12* lib/rubygems: Update to RubyGems 2.5.0+ HEAD(db78980).hsbt
this version includes #1367 , #1373 , #1375 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12io.c: avoid kwarg parsing in C APInormal
* benchmark/bm_io_nonblock_noex2.rb: new benchmark based on bm_io_nonblock_noex.rb * io.c (io_read_nonblock): move documentation to prelude.rb (io_write_nonblock): ditto (Init_io): private, internal methods for prelude.rb use only * prelude.rb (IO#read_nonblock): wrapper + documentation (IO#write_nonblock): ditto [ruby-core:71439] [Feature #11339] rb_scan_args and hash lookups for kwargs in the C API are clumsy and slow. Instead of improving the C API for performance, use Ruby instead :) Implement IO#read_nonblock and IO#write_nonblock in prelude.rb to avoid argument parsing via rb_scan_args and hash lookups. This speeds up IO#write_nonblock and IO#read_nonblock benchmarks in both cases, including the original non-idiomatic case where the `exception: false' hash is pre-allocated to avoid GC pressure. Now, writing the kwargs in natural, idiomatic Ruby is fastest. I've added the noex2 benchmark to show this. 2015-11-12 01:41:12 +0000 target 0: a (ruby 2.3.0dev (2015-11-11 trunk 52540) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-11 avoid-kwarg-capi 52540) ----------------------------------------------------------- benchmark results: minimum results in each 10 measurements. Execution time (sec) name a b io_nonblock_noex 2.508 2.382 io_nonblock_noex2 2.950 1.882 Speedup ratio: compare with the result of `a' (greater is better) name b io_nonblock_noex 1.053 io_nonblock_noex2 1.567 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11add ticket numberskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11sprintf.c: nil value is validnobu
* sprintf.c (rb_str_format): look up the key, then get default value and raise KeyError if the returned value is nil. [ruby-dev:49338] [Ruby trunk - Bug #11677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11vm_eval.c: skip internal namesnobu
* vm_eval.c (local_var_list_add): skip internal local variable name by its type but not if it has a name. internal local variable names are just unique per frame, not globally. [ruby-core:71437] [Bug #11674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11Add the ticket number to ChangeLog.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11* transcode.c: fix a typohsbt
[ci skip][fix GH-1091] Patch by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11* lib/net/ftp.rb (initialize): Connections are in passive mode pershugo
default now. The default mode can be changed by Net::FTP.default_passive=. * lib/net/ftp.rb (default_passive=, default_passive): new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11sprintf.c: hash default valuenobu
* sprintf.c (rb_str_format): respect default value of a hash. no longer raises KeyError unless the default value of the hash is nil. [ruby-core:71354] [Bug #11661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10* lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".akr
* lib/pp.rb: Ditto. * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/securerandom.rb: Ditto. * lib/tmpdir.rb: Ditto. * lib/unicode_normalize/tables.rb: Ditto. * test/net/ftp/test_buffered_socket.rb: Ditto. * test/net/ftp/test_mlsx_entry.rb: Ditto. * test/open-uri/test_open-uri.rb: Ditto. * test/open-uri/test_ssl.rb: Ditto. * test/pathname/test_pathname.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. * ext/pathname/lib/pathname.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e