GitXplorerGitXplorer
s

WordSorter

public
0 stars
28 forks
0 issues

Commits

List of commits on branch master.
Unverified
355307ba497948765f693c797a5e952ae0424092

Initial commit

committed 12 years ago

README

The README file for this repository.

Go/Java WordSorter Comparison

The Java code in this project was originally an assignment from the university. The goal was to write a Java program that accepted a list of words, and wrote them out in sorted order, using threads for speed. I used this project to see how Google's new language, Go, compared against Java with emphasis on LOC and performance. I'm glad to say that Go easily beats Java in both these cases. Go is also dramatically easier on system memory than Java.

Use

Go project can be run by entering the Go directory and issuing the following: go run main.go 128 sowpods.txt out.txt 128 is the number of goroutines, sowpods.txt is the input and out.txt is the output.

Java project can be run by entering Java directory and compile using javac Sort.java then run by issuing java Sort 128 sowpods.txt out.txt

Results

On my Macbook Air 13" mid-2012 the results where the following: Go: 732ms Java: 952ms