mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string.c (Init_frozen_strings): use st_init_table_with_size
All symbols have an fstring entry, and we initialize symbol tables with 1000 bins. This reduces resizes during startup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8ec4b2cf2
commit
a4a2b9be7a
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Sep 12 06:55:40 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* string.c (Init_frozen_strings): use st_init_table_with_size
|
||||
|
||||
Fri Sep 12 06:15:37 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (sym_find): remove Symbol.find because we have Symbol GC now.
|
||||
|
|
2
string.c
2
string.c
|
@ -8948,5 +8948,5 @@ void
|
|||
Init_frozen_strings(void)
|
||||
{
|
||||
assert(!frozen_strings);
|
||||
frozen_strings = st_init_table(&fstring_hash_type);
|
||||
frozen_strings = st_init_table_with_size(&fstring_hash_type, 1000);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue