Fork me on GitHub
#other-languages
<
2024-01-04
>
Rupert (All Street)19:01:56

There a project to benchmark programming language performance: https://github.com/attractivechaos/plb2 • Might be interesting for someone to code up a Clojure implementation (if anyone feels like it!). I assume it should be able to perform just as well as Java (although it may not look very idiomatic e..g. using Arrays instead of vectors etc). • Java does very well in this table. • Python is still embarassingly far behind in this table.

Ben Sless19:01:24

I'm interested in how Java will perform if the code was run several times. Could even be better

Noah Bogart20:01:39

these benchmarks seem to be focusing on very specific kinds of programming. i realize the goal is to compare the same algorithm across languages, but I don't know anyone who would write java like https://github.com/attractivechaos/plb2/blob/master/src/java/nqueen.java lol

Rupert (All Street)21:01:24

Yeah it's certainly not idiomatic - but I think it's a reasonable style of Java code for writing very high performance methods.

1
andy.fingerhut21:01:55

Similar in style is the Computer Language Benchmarks Game, which for a few years included Clojure versions of its programs, but not any more. Very non-idiomatic programs in most of the languages represented, where people tweaked the implementation as much as possible to reduce compute time: https://benchmarksgame-team.pages.debian.net/benchmarksgame/

andy.fingerhut21:01:36

Some Clojure code that I wrote, and even better ones by Alex Miller, should still be in this old repo: https://github.com/jafingerhut/clojure-benchmarks

Noah Bogart22:01:08

fun to see the old-style metadata in that code

grav20:03:17

> I don't know anyone who would write java like this lol A compiler? 😄