Project

General

Profile

This project is closed and read-only.

Actions

Feature #889

closed

erb.rb should use Array and << for eoutvar and not String and concat

Feature #889: erb.rb should use Array and << for eoutvar and not String and concat

Added by enebo (Thomas Enebo) almost 18 years ago. Updated over 15 years ago.

Status:
Rejected
Assignee:
-
[ruby-core:20578]

Description

=begin
Repeated String concatenation is not as fast or efficient as an array.join('') on a list of strings since the array can know at join time how big the result string should be.

This makes a decent perf difference and is quite a bit gentler on memory allocation.

I attached a patch. This appears to be applicable on all versions of Ruby.
=end


Files

erb.patch (695 Bytes) erb.patch enebo (Thomas Enebo), 12/16/2008 03:17 AM

Related issues 1 (0 open1 closed)

Related to Ruby - Feature #905: Add String.new(fixnum) to preallocate large bufferClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: PDF Atom