in reply to perl function complexity

splice operations that add/remove leading/trailing elements to/from arrays are very fast. They do not copy the array. That means they have a O(N) run time, where N is the number of elements added/removed. Same goes for the shortcuts shift, unshift, push and pop.

Or so I was told.