SkillAgentSearch skills...

PerfTesting

C vs Scala vs Go vs Perl test

Install / Use

/learn @TJC/PerfTesting
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This project benchmarks the performance of Perl, Go and Scala with some basic data processing from a CSV file. It's not an amazingly-realistic task, but it's vaguely similar to some of the real-world projects I do, and thus perhaps more comparable than some of the totally synthetic benchmarks out there.

Read TASK to see what the specification is.

Use make_file.pl to create the source file, ie. ./make_file.pl > input.csv

Then for each test, run it with the input file, and pipe the output somewhere. For example: ./go/testread input.csv > output.csv (or pipe to /dev/null)

In my testing, I was using Scala 2.8.0.RC1 on Java 1.6, w/OpenCSV.sf.net Perl 5.10.1 w/Text::CSV 1.17 and Text::CSV_XS 0.72 Go (May 2010 build)

I received the following results: With a 100,000 row CSV file, they looked like: Perl - 1.089 secs Scala - 1.857 secs Go - 1.682 secs

With a 1,000,000 row file: Perl - 10.96 s Scala - 9.835 s Go - 16.77 s

With a 10,000,000 row file: Perl - 111.3 s Scala - 89.05 s Go - 154.3 s

I am interested to receive (sensible) optimisations and improvements to the code, and even implementations in other languages. (I'd love to see some in C, C++, Ruby and Python, for starters. I'll probably do them myself, eventually.)

Related Skills

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated9y ago
Forks1

Languages

Go

Security Score

60/100

Audited on Dec 9, 2016

No findings