Hacker News new | ask | show | jobs
by uyhso8 3243 days ago
Not trying to be a troll, but...

I was on the Julia train full-force until I started using it more heavily. My sense is that the benchmarks are a little misleading.

These benchmarks give a little flavor of what I'm talking about: https://github.com/kostya/benchmarks

If you look at them, you'll see that Julia is indeed crazy fast in some cases. But in other cases, the performance is kind of middling. The native threads implementation of matmul is obscenely fast, but the "pure Julia" implementation is pretty slow--faster than R or Python for sure, but not in the same ballpark as C.

You could argue "well, why would you not use the native threads implementation in that case?" However, for someone implementing a routine in Julia, the implementation would be the pure one. That's the point.

With something like Rust, or Crystal, or Nim, what is promised is basically what you get: something in the ballpark of C. But with Julia, I feel like it's kind of unpredictable.

The problem is that the slow parts end up being a bottleneck that slows down the rest of the code, and that slow code is slow enough that it's not worth it relative to C or Python/R. That is, if you're writing heavy numerics, when you get to 20x slower than C, you might as well write it in C (or Rust or Crystal or Nim), and wrap Python or R around it, because that 20x is enough to kill it. At that point you might as well go with the established language even though it's 100x slower as an interface, and use something fast for the heavy lifting.

Crystal I can't say much about. It seems great, but the "everything is an object" makes me nervous--I tend to get anxious about inheritance because it drives me nuts. Nim seems more attractive to me. But who knows--it's also not like you can't have more than one language out there.

1 comments

I see, thanks for that info on Julia's performance.

As for OOP, I feel like that's more a matter of preference. I don't buy the functional is better (generally speaking not specific situations where it might be). But I could be wrong, I just don't see evidence, only anecdotal claims by fans of functional programming (which doesn't mean they're wrong only that I'm not convinced). To be fair, they have arguments against OOP in favor of functional, but I'm not personally sold. Or maybe I just like Ruby and it's approach to OOP.

Ruby did/does have a nice OOP approach. I remember when Python and Ruby were first kind of being touted as alternatives to Perl, and Ruby always seemed more well-thought out to me--the Python 2-3 split was something I sort of saw coming.

I wouldn't say I'm a functional purist (at least so far), but inheritance in particular has caused me some headaches in the past. I like Rust's approach to all of that, but it's much lower level.

Honestly, if Crystal ended up taking over the programming world, I wouldn't mind. Its a very nice language with a lot of advantages over what people are using now.