Also had period of time with python, had many experiences.Usually always writes the request efficiency very high procedure, discovered python very is really good.But regarding the ultra big list data, the memory needs to release immediately frequently.I summarized some related performance skill, has a look everybody to be able to use.
1。Great data quantity list, must carry on the partial element to delete, avoids as far as possible with the del stochastic deletion, affects the performance extremely, if the deletion quantity is very big, was inferior direct newly built list, then releases clear spatial old list with following method.
2。Regarding general data quantity ultra big list, the fast clear spatial release memory, may = [] release directly with a.A is list.
3。Regarding took the function parameter list, with above method is not good, after because the function carries out, the list length is invariable, but may like this release parameter list in the function to occupy the memory: del a[:], the speed is very quick, also thorough: