other-languages

Rupert (Sevva/All Street) 2024-01-04T19:13:56.047099Z

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.

grav 2024-03-23T20:35:17.023929Z

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

Ben Sless 2024-01-04T19:56:24.484559Z

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

2024-01-04T20:20:39.010679Z

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 (Sevva/All Street) 2024-01-04T21:02:24.452289Z

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

➕ 1
2024-01-04T21:52:55.106149Z

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/

2024-01-04T21:53:36.866339Z

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

2024-01-04T22:02:08.256379Z

fun to see the old-style metadata in that code