See also the original Julia paper, which covers some these decisions in
more detail: http://arxiv.org/pdf/1209.5145v1.pdf

That leaves LLVM. So what's so special about it?
>

LLVM moves the goalposts by eliminating a chunk of the necessary work to
build a fast language. But having a good low-level optimizer is only one
part of a fast language. Semantics matter; it is quite possible to build a
slow language with LLVM.

If I get R to use LLVM (which is probably not easy, but let's just speak in
> hypotheticals), could I also get a speed comparable to Julia?


In some sense, this is the wrong question. The more pertinent question is:
at how much effort (i.e. cost). The example of JavaScript shows that with
sufficient effort, a totally crazy language (from a type-stability and
runtime-modifiability standpoint) can be made quite fast. But it has taken
many years of concerted and expensive effort to get there. Julia is
designed to feel "dynamic enough" for interactive use without, as Jameson
said, allowing some of the harder-to-optimize things that are possible in
other dynamic languages.




On Sun, Aug 3, 2014 at 8:46 PM, Jameson Nash <[email protected]> wrote:

> I would say that while all of those technologies were certainly crucial to
> making Julia fast, none of them are magic. There are projects to get other
> dynamic languages using LLVM's JIT, including Python and R.
>
> So what makes Julia fast?
>
> Language design.
>
> Julia was designed from the beginning to have certain features that are
> necessary for high performance: type stability, pervasive type inference,
> execution semantics that closely match the hardware capabilities
> (pass-by-sharing, machine arithmetic), inlining, and macros.
>
> Additionally, certain oft-requested features were not included which make
> high performance much more difficult – or impossible – to achieve. These
> include: pass-by-copy, first class local namespaces (aka eval in function
> scope). Leaving out other features, such as making everything callable and
> allowing overloading of the getfield function (a.b access), while not
> essential to providing performance since they could be similarly optimized,
> have not been implemented since they might detract from the performance.
>
>
>
> On Sun, Aug 3, 2014 at 6:01 AM, Michael Smith <[email protected]> wrote:
>
>> I've been following Julia with great interest (and a lot of respect), but
>> one thing that I don't fully understand is why it is so fast.
>>
>> For example, let's compare it to R, which is mainly written in C (and a
>> bit of Fortran). On the other hand (according to Wikipedia), Julia's core
>> is implemented in C and C++ (similar to R), its parser in Scheme, and the
>> LLVM compiler framework is used for just-in-time generation of machine
>> code. Scheme is probably *not* the main reason why Julia is so fast, and
>> whether one uses C or C++ probably does *not* matter much as well (in
>> terms of speed).
>>
>> That leaves LLVM. So what's so special about it?
>>
>> If I get R to use LLVM (which is probably not easy, but let's just speak
>> in hypotheticals), could I also get a speed comparable to Julia?
>>
>> Thanks,
>> M
>>
>
>

Reply via email to