Bug #14654
closedResurvey performance of RDoc by frozen_string_literal: true
Description
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
Updated by naruse (Yui NARUSE) almost 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED
Updated by naruse (Yui NARUSE) almost 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r63048.
Resurvey performance of RDoc by frozen_string_literal: true [Bug #14654]
Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago
- 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.