Merge Sort in Java, anyone tried this?

None-yet

Member
Joined
Aug 10, 2020
Messages
78
Reaction score
32
Credits
906
I did not see anywhere to post general software questions thus I am posting this here. Been doing a lot of reading. I am not a programmer. I have read a number of articles on Merge Sort in Java. I sort -u merge a couple times a day. Most of the time it is very large files. My normal operation when I do this is sort -u --parallel=4 -d and I have been playing with the options to see if anything works faster, although I have not bench mark to compare with. Just playing by ear sort of.

I have been reading about a Java implantation. It is supposed to be much faster. Here is a couple of article I have read. Not really in-depth Very detailed I also found a link for the source. Plan on doing some reading on how to compile this because I have been thinking it was interesting.

My question is does anyone have any experience with this java implementation? I have a couple of Vbox Kali that I enjoy crashing. lol But wanted to check here to see if anyone has tried this?
 


From reading the article - the author in the second, Java related article is talking about using a merge sort algorithm instead of using a sequential sort because the merge-sort is faster.

But you should also know that GNU sort already uses the merge-sort algorithm.

So IMHO, there's no point writing and debugging something from scratch in java.
GNU sort is a well-tested sorting program, with a mature and robust code-base.
Also GNU sort is written in C, so it will be faster than the Java implementation anyway - given the overhead involved in loading the java runtime before the java program can even start running!
 
Understood
 

Staff online


Top