Julia programs now shown on benchmarks game website

Hopefully, now that Julia 1.1.0 has landed, some more programs from BenchmarksGame.jl will make it to the benchmarks game website.

Doesn’t look like it.

I expect the program authors are busy doing other stuff, and will eventually contribute their programs to the benchmarks game.

2 Likes

Benchmarks game website added comparisons to Fortran and Chapel.

I wrote my own benchmark for reverse complement since it is currently the slowest up there, and managed to bring down memory use to competitive with the best from other languages. Haven’t submitted anything though.

Still not fully optimized and mostly written for readability (hopefully). Feel free to suggest improvements.

4 Likes

Unfortunatelly the benchmarks game site doesn’t update the results.

Made some further changes. Just submitted my benchmark as a PR on their repo. I don’t expect too much from it.

I think that having a decent showing on the benchmarks game is a relatively important thing to do from a PR perspective if we want to tell people that the language is fast. The language has been post-1.0 for almost a year now.

2 Likes

Nice!
Your code looks, however, like you are not doing a “read line-by-line”: body = readuntil(instream,UInt8('>'))? This is the part where I broke my neck trying to reach Kristoffers speeds, because you can’t really allocate memory for the whole string until you know how long it’s going to be.

I got down to maybe 40% of the current time, while Kristoffer & Crew are somewhere around 15% on my computer :stuck_out_tongue:

Yeah.

Ugh. That’s an absolutely stupid way to read a big block of text into memory, or even to parse a formated stream.

Okay, that can still be made fast with BufferedStreams.jl at the cost of extra memory use. I’ll write a version based on that, and rewrite a basic implementation of InputStreams myself if I get complaints over dependencies. The Golang solution gets to use BufIO. Big question is whether or not you are allowed to use anchors.

I think your code is fine and the point is simply that it must work interactively: Whenever you get sent enough input that there is a newline, you need to process and flush output and are disallowed from waiting (blocking) for more input. It is not permissible to wait until EOF with the processing.

FASTA is one line per gene if I remember correctly, so each line here could be say 5-40KB and the whole file could be a couple of gigs, so you can’t just slurp the whole file into RAM, well these days you can but 20 years ago or more when the files were invented you couldn’t.

in any case it’s not reading 80 chars at a time

You are right, it’t 60 chars at a time (from a 1GB file) :wink:

And at least for this benchmark you pretty much have to read it all into memory (look at the memory use), because you have to reverse the whole thing and you can’t really do that before you have read in the end.

2 Likes