Project

General

Profile

Actions

Feature #10468

closed

URI::RFC2396_Parser#initialize: reduce from 2088 to 1332 bytes

Feature #10468: URI::RFC2396_Parser#initialize: reduce from 2088 to 1332 bytes

Added by normalperson (Eric Wong) about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
[ruby-core:66059]

Description

lib/uri/rfc2396_parser.rb (initialize): reduce bytecode size Reduce the initialize method from 2088 to 1332 bytes on 32-bit x86 Measurement obtained using `memsize_of_all', as `memsize_of' is non-recursive: a = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) RubyVM::InstructionSequence.compile(src) b = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) p(b - a) In the future, it may be able to make the bytecode compiler perform this optimization transparently for existing code. However, I also like the shorter &:method syntax. I'll commit in a few days unless there's an objection. 

Files

Updated by naruse (Yui NARUSE) almost 11 years ago Actions #1 [ruby-core:66586]

  • Status changed from Open to Closed
Actions

Also available in: PDF Atom