https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112019-09-19T08:35:55ZRuby Issue Tracking SystemRuby master - Feature #16163: Reduce the output of `RubyVM::InstructionSequence#to_binary`https://bugs.ruby-lang.org/issues/16163?journal_id=816052019-09-19T08:35:55ZNagayamaRyoga (Nagayama Ryoga)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" title="Improve the output of `RubyVM::InstructionSequence#to_binary` (#2450) The output of RubyVM::Inst..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/20baa08d652b844806fab424a2a590408ab613ef">git|20baa08d652b844806fab424a2a590408ab613ef</a>.</p>
<hr>
<p>Improve the output of <code>RubyVM::InstructionSequence#to_binary</code> (<a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Array#sample can loop forever [patched] (Closed)" href="https://bugs.ruby-lang.org/issues/2450">#2450</a>)</p>
<p>The output of RubyVM::InstructionSequence#to_binary is extremely large.<br>
We have reduced the output of #to_binary by more than 70%.</p>
<p>The execution speed of RubyVM::InstructionSequence.load_from_binary is about 7% slower, but when reading a binary from a file, it may be faster than the master.</p>
<p>Since Bootsnap gem uses #to_binary, this proposal reduces the compilation cache size of Rails projects to about 1/4.</p>
<p>See details: [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Reduce the output of `RubyVM::InstructionSequence#to_binary` (Closed)" href="https://bugs.ruby-lang.org/issues/16163">#16163</a>]</p>