merging really huge lists fast
Joshua Macy
amused at webamused.com
Sun Feb 13 12:39:30 EST 2000
More information about the Python-list mailing list
Sun Feb 13 12:39:30 EST 2000
- Previous message (by thread): Py-Mode on GNU Emacs?
- Next message (by thread): merging really huge lists fast
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thomas wrote: > > Hi, > > I got huge lists I want to merge, but the good old new_list = list1 + > list2 seems to be slow. Any hints? > > Thomas new_list = list1 + list2 creates a new list containing a (shallow) copy of the elements of list1 and list2. list1.extend(list2) will append list2 to the end of list1. My guess, without timing it, is that the latter would be faster for huge lists, although it changes the semantics... Joshua
- Previous message (by thread): Py-Mode on GNU Emacs?
- Next message (by thread): merging really huge lists fast
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list