ruby-changes:33616
From: nobu <ko1@a...>
Date: Thu, 24 Apr 2014 11:04:36 +0900 (JST)
Subject: [ruby-changes:33616] nobu:r45697 (trunk): parse.y: trivial optimization
nobu 2014-04-24 11:04:29 +0900 (Thu, 24 Apr 2014) New Revision: 45697 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45697 Log: parse.y: trivial optimization * parse.y (rb_str_dynamic_intern): branch by same condition as rb_id2sym to reduce unnecessary branch. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 45696) +++ parse.y (revision 45697) @@ -10715,7 +10715,7 @@ rb_str_dynamic_intern(VALUE str) https://github.com/ruby/ruby/blob/trunk/parse.y#L10715 if (st_lookup(global_symbols.sym_id, str, &id)) { VALUE sym = ID2SYM(id); - if (!STATIC_SYM_P(sym)) { + if (ID_DYNAMIC_SYM_P(id)) { /* because of lazy sweep, dynamic symbol may be unmarked already and swept * at next time */ rb_gc_resurrect(sym); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/