Project

General

Profile

« Previous | Next » 

Revision aa93c62e

Added by normal over 9 years ago

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

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