[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-core
Subject: [ruby-core:66586] [ruby-trunk - Feature #10468] [Closed] URI::RFC2396_Parser#initialize: reduce from
From: naruse () airemix ! jp
Date: 2014-11-30 8:31:34
Message-ID: redmine.journal-50201.20141130083134.33ac52ea3b5f8428 () ruby-lang ! org
[Download RAW message or body]
Issue #10468 has been updated by Yui NARUSE.
Status changed from Open to Closed
----------------------------------------
Feature #10468: URI::RFC2396_Parser#initialize: reduce from 2088 to 1332 bytes
https://bugs.ruby-lang.org/issues/10468#change-50201
* Author: Eric Wong
* Status: Closed
* Priority: Normal
* Assignee:
* Category: lib
* Target version: current: 2.2.0
----------------------------------------
~~~
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--------------------------------
0001-lib-uri-rfc2396_parser.rb-initialize-reduce-bytecode.patch (1.57 KB)
--
https://bugs.ruby-lang.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic