In most cases, there isn't a beneficial performance boost from emptying an array this way. One needs to allocate in a loop or do something equally inefficient to measure the difference between `coll = []` and `coll.length = 0`. (This assumes the language runtime does not statically allocate an immutable, empty array and use that to represent all empty arrays. Clojure does this, for instance, so no allocations occur when binding a variable to [] or other empty collections).
In JavaScript these two statements have very different effects.
foo = []; Will reassign the reference but other pointers can still have the array.
foo.length=1 will remove all elements but the first.
"If deleteCount is omitted, or if its value is greater than or equal to the number of elements after the position specified by start, then all the elements from start to the end of the array will be deleted."
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...