• my_arr[my_arr.length]=new_elem is slightly faster than my_arr.push(new_elem)


  • string prepends ( my_str=","+my_str ) are fast, but pollute memory with lots of temporary objects when called frequently or from within a loop. so the carbage collector is likely to get triggered and can delay the program by seconds! string appends ( my_str+="," ) as well as ( my_str=my_str+"," ) do not face this problem.
Recent Changes (All) | Edit SideBar Page last modified on August 21, 2010, at 03:50 PM Edit Page | Page History
Powered by TechnoloWiki