Live data from Hacker News

Julia v0.7.0 Release Notes

github.com

21–30 of 61 posts

Re: Julia v0.7.0 Release Notes

#21
post #19

Earlier quoted context omitted.

Thanks. Well, I've heard of the language Julia, but didn't connect the title with it as it sounded like a person, robot or something.. Mm sounds good. Is it as fast as, say, C?

Ah, gotcha. Maybe it didn't initially say "Julia Lang"; it does now, perhaps thanks to your comment.

Hehe no. It said "Julia Lang v0.7" but I'm not insider enough to think of Julia the language when I read that. I wondered "Who is Julia Lang? Hmm must be some software?" etc

Re: Julia v0.7.0 Release Notes

#22
post #12

Earlier quoted context omitted.

Hmm, I would guess that if somebody doesn't already know about the Julia language, this wouldn't be a very interesting page (which is fine). So this is a great title! In case you're curious, the website is https://julialang.org/ > Julia is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and a…

Thanks. Well, I've heard of the language Julia, but didn't connect the title with it as it sounded like a person, robot or something.. Mm sounds good. Is it as fast as, say, C?

When you write code in a C like fashion it can often get as fast or faster than C. Of course it has the disadvatnage of all jit languages that it will likely have slower startup. But when you crunch big chunks of data it should be able to compete with C.

Actually want to qualify this a bit. Nothing gets automatically fast by just picking a fast language. That Julia is close to C in performance mainly means it is possible to achieve this through optimization without too much effort. However you still need to have some idea of what makes something slow or fast in Julia.

Personally I find it very easy to optimize Julia code because you can quickly see how the JIT transforms an individual function and what you may need to change.

Re: Julia v0.7.0 Release Notes

#23

Earlier quoted context omitted.

Thanks. Well, I've heard of the language Julia, but didn't connect the title with it as it sounded like a person, robot or something.. Mm sounds good. Is it as fast as, say, C?

When you write code in a C like fashion it can often get as fast or faster than C. Of course it has the disadvatnage of all jit languages that it will likely have slower startup. But when you crunch big chunks of data it should be able to compete with C. Actually want to qualify this a bit. Nothing gets automatically fast by just picking a fast language. That Julia is close to C in performance mainly means it is poss…

Ok thanks. Lately been using Cython with its near-C speed and Python convenience. Just quickly had a look at Julia wiki page, seems like a fast Python, is that fair?

Re: Julia v0.7.0 Release Notes

#24

Earlier quoted context omitted.

When you write code in a C like fashion it can often get as fast or faster than C. Of course it has the disadvatnage of all jit languages that it will likely have slower startup. But when you crunch big chunks of data it should be able to compete with C. Actually want to qualify this a bit. Nothing gets automatically fast by just picking a fast language. That Julia is close to C in performance mainly means it is poss…

Ok thanks. Lately been using Cython with its near-C speed and Python convenience. Just quickly had a look at Julia wiki page, seems like a fast Python, is that fair?

Python doesn't have multiple dispatch though. It's central to making Julia's type system fast. I.e., it's not just loops that are fast, but also code that uses Julia-defined data structures are fast. Additionally, you can write generic code and have it automatically compile fast code for large classes of types. Also, the whole Base library is written in Julia, mostly generically, so this will be compatible with your user-defined data structures as well.

Then finally, the kicker is that Julia, especially on v0.7, doesn't optimize functions separately: it optimizes them together. It will inline small functions into others, perform interprocedural optimizations and utilize compilation-time constants, etc. Thus when the code is Julia all the way down, it can and will compile everything together to optimize it a lot more than functions compiled separately, giving a lot more performance benefits. When you add in the macros to turn off things like bounds checks and adding in explicit SIMD, you truly get to C-level of performance and many times beyond because your code is so architecturally and vertically optimized (it's like you put on the flags to say "compile code that only works for this current machine with this current codebase", and it can safely make this assumption because it's JITing).

Because of this, it goes much further than Cython, and this also makes the type system and multiple dispatch central to the language. So I would say at a surface level it's "fast Python" (or "more productive C", that's how I usually think of it). However, at a deeper level the type system is so central that larger software architectures will be different to accommodate this multiple dispatch style as opposed to OOP.

Re: Julia v0.7.0 Release Notes

#25

Earlier quoted context omitted.

I don’t use Julia but those language changes would have me worried that existing code would start behaving differently because of parser changes.

We're very careful with changes and give thorough deprecation warnings. When you upgrade and the meaning of something that you're using is going to change in the following version, you will get a warning to change it now, with specific detail of the new spelling of that feature. So as long as you don't skip major versions, you're safe. Corollary: don't skip major versions. Even if you're upgrading from 0.4 to 0.7, yo…

> you'll want to upgrade /through/ versions 0.5 and 0.6 instead of skipping them.

god that sounds sooo painful

Re: Julia v0.7.0 Release Notes

#26

Earlier quoted context omitted.

When you write code in a C like fashion it can often get as fast or faster than C. Of course it has the disadvatnage of all jit languages that it will likely have slower startup. But when you crunch big chunks of data it should be able to compete with C. Actually want to qualify this a bit. Nothing gets automatically fast by just picking a fast language. That Julia is close to C in performance mainly means it is poss…

Ok thanks. Lately been using Cython with its near-C speed and Python convenience. Just quickly had a look at Julia wiki page, seems like a fast Python, is that fair?

I've gotten Cython-like speeds for non-parallelized code in a gradient descent task. I haven't been able to achieve the same speed as parallelized Cython code in Julia using either pmap or @parallel though.

I wouldn't say it's a fast Python.

Edit: Grammar

Re: Julia v0.7.0 Release Notes

#27
post #16

Earlier quoted context omitted.

The forthcoming Julia 0.7 release will provide warning messages for important (and breaking) changes that the community has been clamoring for. I don't think users are "worried" so much as they are planning to review and update their code accordingly. For example, I don't expect my existing 0.5 code to work without substantial revisions. This is the last window to improve the language proper before the 1.0 release, a…

I have investigated Julia for a while and am exactly holding off starting some major work until 1.0 is in.

Just FYI as noted above, 0.7 is the harbinger of 1.0. It is functionally equivalent to 1.0 except deprecation warning, serving essentially as a migration version. So while not out yet, 1.0 is around the corner!

Re: Julia v0.7.0 Release Notes

#28

Earlier quoted context omitted.

Ok thanks. Lately been using Cython with its near-C speed and Python convenience. Just quickly had a look at Julia wiki page, seems like a fast Python, is that fair?

I've gotten Cython-like speeds for non-parallelized code in a gradient descent task. I haven't been able to achieve the same speed as parallelized Cython code in Julia using either pmap or @parallel though. I wouldn't say it's a fast Python. Edit: Grammar

You weren't doing the same thing. Julia's `pmap` and `@parallel` are multiprocessing. These will parallelize across multiple computers, like multiple nodes of a cluster. It has much larger scaling potential (it's more like MPI) but at the cost of a larger overhead (like MPI). It for example was used to achieve >1 petaflops in the Celeste.jl application on the Cori supercomputer.

Cython's parallelism is via OpenMP which is shared memory multithreading. Of course multithreading is faster, but it's restricted to a single computer. Julia does have multithreading as well via `Threads.@threads`. This is shared memory and restricted to a single computer just like Cython, and will have a lot lower overhead than `pmap` and `@parallel`. If you want to directly compare something to Cython's parallelism, this is what you should be looking at.

On a side note, it looks like Cython doesn't have any native multiprocessing or multinode parallelism that would be the direct comparison to `pmap` or `@parallel`.

Re: Julia v0.7.0 Release Notes

#29

Earlier quoted context omitted.

We're very careful with changes and give thorough deprecation warnings. When you upgrade and the meaning of something that you're using is going to change in the following version, you will get a warning to change it now, with specific detail of the new spelling of that feature. So as long as you don't skip major versions, you're safe. Corollary: don't skip major versions. Even if you're upgrading from 0.4 to 0.7, yo…

> you'll want to upgrade /through/ versions 0.5 and 0.6 instead of skipping them. god that sounds sooo painful

That's only if you haven't touched your code in 2 years or so, and is also just an issue with early adoption. There's a reason why Julia wasn't labelled v1.0 yet, but post-1.0 is where the syntax is stable.

Re: Julia v0.7.0 Release Notes

#30

Earlier quoted context omitted.

We're very careful with changes and give thorough deprecation warnings. When you upgrade and the meaning of something that you're using is going to change in the following version, you will get a warning to change it now, with specific detail of the new spelling of that feature. So as long as you don't skip major versions, you're safe. Corollary: don't skip major versions. Even if you're upgrading from 0.4 to 0.7, yo…

> you'll want to upgrade /through/ versions 0.5 and 0.6 instead of skipping them. god that sounds sooo painful

It's not so bad really – having done it a few of times on fairly large code bases. Upgrading a project for a new Julia version is very straightforward: change the julia version, run your tests, and making any changes that warnings tell you to make. It's about as difficult as fixing compiler warnings in C – it's tedious but not hard.

Keep in mind that in the future this statement would be something like: if you have code that was written for Julia 1.x and want to upgrade to Julia 3.x, then you should upgrade through Julia 2 instead of just skipping it. This does not seem terribly unreasonable.

Post reply on HN