Project

General

Profile

« Previous | Next » 

Revision 0eb7359c

Added by shyouhei (Shyouhei Urabe) about 8 years ago

add rb_hash_new_with_size()

Sometimes, size of a hash can be calcluated a priori. By providing
such info to the constructor we can avoid unnecessary internal re-
allocations. This can boost for instance creation of hash literals.
[Bug #13861]

Signed-off-by: Urabe, Shyouhei

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e