What is the best way to sort a huge array. I have 1G RAM, a 16G array. What is the most effective method for doing this? I have enough files for files.
Divide into pieces and sort 512 MB in 32 files. Then stream stream the files into a single file.
If it is an array of integers, you can get a naive sort of radius (O(n))and almost no RAM. First question: "What is the data?" If its arbitrary data, then external merging is likely to be your best option.
(O(n))
-tjw
Source: https://habr.com/ru/post/1794310/More articles:Почему нет/не может IDictionary реализовать ILookup ? - dictionaryFinding a way to display outlines around the current text on a web page - javascriptBreadcrumbs SiteMapPath and SEO-Friendly Routing - asp.netpostgres equivilent of oracle sqlplus "set echo on" - postgresqlThe most efficient way to transition from an Eclipse project to a Hudson Build - javaHow to check, throw and catch a bean validation ConstraintViolationException - javaPython module module result is incorrect - pythonWhen can I store derived data in a database? - databaseотобразить данные JSON в jqGrid - jqgridВыяснение того, что ДЕЙСТВИТЕЛЬНО пошло не так, когда поднят `ImportError` - pythonAll Articles