sortfile

command
v0.0.1-rc20230124 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 4 Imported by: 0

README

sortfile command

sortfile is a simple command line tool to sort a file in-memory or external sort.

sortfile <input file> <output file>

It is much faster than the ordinary sort command in linux/unix. Though, we beleive it can be improved further.

$ # Around 1 GB of random data
$ ls -lah shuffled_huge.txt
-rw-r--r--  1 keinos  staff   985M  1 12 22:29 shuffled_huge.txt

$ # Ordinary sort command of linux/unix
$ time sort shuffled_huge.txt -o out_sort.txt
real    5m35.706s
user    11m52.320s
sys     0m40.690s

$ # Our sortfile command
$ time sortfile shuffled_huge.txt out_sortfile.txt
real    0m43.294s
user    0m36.283s
sys     0m5.751s

$ # Compare the result (no diff)
$ diff out_sort.txt out_sortfile.txt
$

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL