top | item 47179063

(no title)

SatvikBeri | 2 days ago

> might not need to use a compiled language

A very minor nit: Julia is a compiled language, but it has an unusual model where it compiles functions the first time they're used. This is why highly-optimized Julia can have pretty extreme performance.

> I would say the performance is overstated by the community but out of the box it is good enough to avoid languages like C/C++ to build solutions.

For about a year we had a 2-hour problem in our hiring pipeline where the main goal was to write the fastest code possible to do a task, and the best 2 solutions were in Julia. C++ was a close third, and Rust after that.

discuss

order

sinnsro|2 days ago

> A very minor nit: Julia is a compiled language

Caught. Should have just listed the usual suspects (C, C++, maybe Rust nowadays?).

> and the best 2 solutions were in Julia. C++ was a close third, and Rust after that.

Awesome. Which type of problem was this, if you can share?

SatvikBeri|2 days ago

It was roughly "given this dataset with 100 time series, write code to calculate these statistics as performantly as possible. Make one single-threaded version and one using 4 cores."

The C++ versions were around ~250 lines long, and the developers generally only had time to try one approach. While the Julia versions were around ~80 lines long, and the developers had time to try several approaches. I'm sure the best theoretically possible C++ version is faster than the best Julia version, but given that we're always working with time constraints, the performance per developer hour in Julia tends to be really good in my experience.