[ruby-cvs:56130] normal:r48980 (trunk): lib/uri: performance improvements [misc #10628]

normal at ruby-lang.org normal at ruby-lang.org
Thu Dec 25 08:50:37 JST 2014


normal	2014-12-25 08:50:37 +0900 (Thu, 25 Dec 2014)

  New Revision: 48980

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48980

  Log:
    lib/uri: performance improvements [misc #10628]
    
    * lib/uri/generic.rb (split_userinfo): fstring for 1-byte split
      (set_port): reduce bytecode size
      (check_path): reduce garbage via opt_str_freeze
      (query=): ditto
      (fragment=): ditto
      [misc #10628]
    * lib/uri/rfc3986_parser.rb (regexp): cache as attr
      (initialize): setup and freeze regexp attr once
      (split): reduce bytecode size, use opt_str_freeze
      (parse): minor bytecode and garbage reduction
      (default_regexp): rename for initialize

  Modified files:
    trunk/ChangeLog
    trunk/lib/uri/generic.rb
    trunk/lib/uri/rfc3986_parser.rb


More information about the ruby-cvs mailing list