LazySorted: A Lazily, Partially Sorted Python List

LazySorted is a Python C extension implementing a partially and lazily sorted list data structure. It solves a common problem faced by programmers, in which they need just part of a sorted list, like its middle element (the median), but sort the entire list to get it. LazySorted presents them with t...

Full description

Bibliographic Details
Main Author: Naftali Harris
Format: Article
Language:English
Published: Foundation for Open Access Statistics 2015-06-01
Series:Journal of Statistical Software
Online Access:http://www.jstatsoft.org/index.php/jss/article/view/2265
id doaj-31296cddb3c7439d83d7037036bcc8e3
record_format Article
spelling doaj-31296cddb3c7439d83d7037036bcc8e32020-11-24T22:54:30ZengFoundation for Open Access StatisticsJournal of Statistical Software1548-76602015-06-0165111010.18637/jss.v065.c01869LazySorted: A Lazily, Partially Sorted Python ListNaftali HarrisLazySorted is a Python C extension implementing a partially and lazily sorted list data structure. It solves a common problem faced by programmers, in which they need just part of a sorted list, like its middle element (the median), but sort the entire list to get it. LazySorted presents them with the abstraction that they are working with a fully sorted list, while actually only sorting the list partially with quicksort partitions to return the requested sub-elements. This enables programmers to use naive "sort first" algorithms but nonetheless attain linear run-times when possible. LazySorted may serve as a drop-in replacement for the built-in sorted function in most cases, and can sometimes achieve run-times more than 7 times faster.http://www.jstatsoft.org/index.php/jss/article/view/2265
collection DOAJ
language English
format Article
sources DOAJ
author Naftali Harris
spellingShingle Naftali Harris
LazySorted: A Lazily, Partially Sorted Python List
Journal of Statistical Software
author_facet Naftali Harris
author_sort Naftali Harris
title LazySorted: A Lazily, Partially Sorted Python List
title_short LazySorted: A Lazily, Partially Sorted Python List
title_full LazySorted: A Lazily, Partially Sorted Python List
title_fullStr LazySorted: A Lazily, Partially Sorted Python List
title_full_unstemmed LazySorted: A Lazily, Partially Sorted Python List
title_sort lazysorted: a lazily, partially sorted python list
publisher Foundation for Open Access Statistics
series Journal of Statistical Software
issn 1548-7660
publishDate 2015-06-01
description LazySorted is a Python C extension implementing a partially and lazily sorted list data structure. It solves a common problem faced by programmers, in which they need just part of a sorted list, like its middle element (the median), but sort the entire list to get it. LazySorted presents them with the abstraction that they are working with a fully sorted list, while actually only sorting the list partially with quicksort partitions to return the requested sub-elements. This enables programmers to use naive "sort first" algorithms but nonetheless attain linear run-times when possible. LazySorted may serve as a drop-in replacement for the built-in sorted function in most cases, and can sometimes achieve run-times more than 7 times faster.
url http://www.jstatsoft.org/index.php/jss/article/view/2265
work_keys_str_mv AT naftaliharris lazysortedalazilypartiallysortedpythonlist
_version_ 1725659504035495936