[openstreetmap-website] Avoid unnecessary array allocations (#140)

John Firebaugh notifications at github.com
Mon Oct 22 03:35:56 GMT 2012


In case it's not obvious: every use of `Array#+=` is equivalent to `array = array + other`, and `array + other` generates a new Array object, leaving the old one to become garbage collected.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/140#issuecomment-9651791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121021/ace0d6ad/attachment.html>


More information about the rails-dev mailing list