mourner/simplify-js — pull request #8 by twpayne (2013-12-02 12:14:48+00:00)
Title: Reduce garbage generation

This PR reduces garbage generation by allowing the user to specify an existing array in which the simplified points should be stored. Specifically:

* `simplify` is modified uses this internally in "low quality" mode, reducing the amount of garbage generated by one `Array`
* the existing array can be the same as the array of points, permitting in-place, destructive simplification and meaning that the only garbage generated is the discarded points
* the existing array could be a separate, spare array, meaning that no garbage is generated at all