Hacker News new | ask | show | jobs
by SatvikBeri 113 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.

2 comments

I would not call that very unusual, even Lisp and Dartmouth BASIC used such approach, BASIC only got the fame of being interpreted when the compiler was thrown away to fit the language with 8 bit home computers ROMs.

Or anyone living in any JIT ecosystem for that matter, when it actually kicks off is an implementation detail, and some ecosystems even have configuration options.

> 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?

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.