News for hackers. Stuff that matters.
Re:Fast Non-Standard Data Structures for Python by sbrother on Monday January 28, 2013 @01:04PM (#5129673)
I'd like to add scipy.spatial.cKDTree for really fast kd-trees. Just used it for a geospatial data analysis application (find the closest N facilities to a given point) and it blew the numpy and standard python alternatives out of the water in terms of speed.
Re:Fast Non-Standard Data Structures for Python by kmike84 on Monday January 28, 2013 @01:34PM (#5129853)
Added to the list, thanks!
Re:Fast Non-Standard Data Structures for Python by willvarfar on Monday January 28, 2013 @07:32AM (#5128221)
Just a random anecdote: I've been badly burned by the heapq for timeouts; although I understand the advantages of the heap in general I think the Python library version is shot-down in practice due to being a purely-Python implementation. I moved to rbtree and suddenly my throughput shot up.
Re:Fast Non-Standard Data Structures for Python by dalke on Monday January 28, 2013 @07:41AM (#5128248)
Ever since Python 2.4, the heapq module has been written in C. It was only Python 2.3 which had the pure Python implementation.

I've used heapq for several of my projects, including one where I did extensive performance testing, and I haven't found it to be a problem.

Re:Fast Non-Standard Data Structures for Python by z-factor on Monday January 28, 2013 @10:15AM (#5128774)
I want to add that I've been using heapq for scheduling in every piece of software as well and it's never been a problem even in heavily loaded projects.
Re:Fast Non-Standard Data Structures for Python by ch0wn on Monday January 28, 2013 @07:48AM (#5128266)
bintrees is a fantastic package. There are even Cython-powered implementations that give a nice speed boost, if you need it.
Re:Fast Non-Standard Data Structures for Python by michaelhoffman on Monday January 28, 2013 @02:10PM (#5130061)
This is a great resource to have. Thank you!
Re:Fast Non-Standard Data Structures for Python by jfb on Monday January 28, 2013 @06:50AM (#5128126)
Very useful, thanks.
Re:Fast Non-Standard Data Structures for Python by cloudshoring on Monday January 28, 2013 @06:29AM (#5128092)
Thanks for sharing!