diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-24 01:22:08 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-24 01:22:08 +0000 |
commit | 752faf4fb4f853e332fe15dcc805b1a5ebff83a9 (patch) | |
tree | fef9c7648ee2a81839c1f5be3f0e4cbcb5a7135c /hash.c | |
parent | fe115fb84f4a88011b150126903f51baaa9b11a1 (diff) | |
download | ruby-752faf4fb4f853e332fe15dcc805b1a5ebff83a9.tar.gz |
net/http: use require_relative to reduce syscalls
require_relative speeds up loading of files by reducing path
lookups. On a clean install with RubyGems-enabled,
"ruby -rnet/http -e exit" shows a reduction in failed open(2)
syscalls from 410 to 350 (x86-64 GNU/Linux).
I could not measure a time difference on my Linux-based
machines, however this should be noticeable to users of other
kernels with worse syscall and VFS performance than Linux.
Further use of require_relative will reduce lookups in other
places.
* lib/net/http.rb: use require_relative
[ruby-core:78285] [Feature #12973]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions