From: aycabta@... Date: 2018-03-31T13:39:19+00:00 Subject: [ruby-core:86413] [Ruby trunk Bug#14654] Resurvey performance of RDoc by frozen_string_literal: true Issue #14654 has been reported by aycabta (aycabta .). ---------------------------------------- Bug #14654: Resurvey performance of RDoc by frozen_string_literal: true https://bugs.ruby-lang.org/issues/14654 * Author: aycabta (aycabta .) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- 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: