PerfTesting
C vs Scala vs Go vs Perl test
Install / Use
/learn @TJC/PerfTestingREADME
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
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
