array_extend should pre-grow the array to avoid multiple regrows

Bug #482078 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Released
Low
Matt Giuca

Bug Description

In interpret.m, array_extend currently appends each element of the second array to the end of the first. If the second array is much bigger than the first, this will result in multiple regrows of the array.

It should call vector.ensure_capacity first, to grow the first array to the required length, then perform the appends.

Tags: interpreter

Related branches

Matt Giuca (mgiuca)
tags: added: interpreter
Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r895.

Changed in mars:
status: Triaged → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.