Issue #14654 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONE

Already backported at r63048.

----------------------------------------
Bug #14654: Resurvey performance of RDoc by frozen_string_literal: true
https://bugs.ruby-lang.org/issues/14654#change-73575

* Author: aycabta (aycabta .)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONE
----------------------------------------
I added "frozen_string_literal: true" to RDoc by https://github.com/ruby/rdoc/pull/551. Back then, I reported "It reduces documents generation time by 5%" by https://github.com/ruby/rdoc/issues/504. The report was added to NEWS file at https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/61354/diff/NEWS.

I resurveyed it: https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800

> The Pull Request https://github.com/ruby/rdoc/pull/551 has many changes for frozen string literal because RDoc expected that all strings are non-frozen. The log "before" that has "frozen_string_literal: false" is faster than the log "after-false" that has "frozen_string_literal: false". Only the implementation changes increase document generation time by 2.6%. But in the case of the same implementation, the log "after" is faster than the log "after-false". The addition "frozen_string_literal: true" reduces document generation time by 1.6%. Finally, the implementation changes and "frozen_string_literal: true" (what means https://github.com/ruby/rdoc/pull/551) increases document generation time by 0.9%.

The attached file fixes the report of NEWS file.

---Files--------------------------------
NEWS_RDoc_performance_survey.patch (511 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>