Comment by nomilk

Comment by nomilk 18 hours ago

4 replies

It cites inability to compile to machine code as a reason for preferring lisp to R and Python.

What are the benefits of an ability to compile to machine code? Does it mean you can make stand alone binaries (I.e. programs that can run without the language - lisp|R|python - installed), or is there some other advantage, eg performance?

bheadmaster 18 hours ago

In my view, the biggest advantages of ahead-of-time compilation is lower binary size, higher performance, and binary portability (in a sense of being able to copy the binary and run it on another system with same architecture and OS, not in the usual sense of being easy to run to a different system architecture or OS).

It is IMO not known widely enough that Python itself can be compiled, using Nuitka [0] compiler. It still runs Python code, so the performance increase is not as extreme as one would get from rewriting in a fully statically typed code, but the AOT compiled C code is still faster than the interpreter.

[0] https://nuitka.net/

  • akashi9 17 hours ago

    Is lower binary size or binary portability really a major concern for statistical computing? In my experience with statistical computing with R and using R I've never once had a situation where producing a binary was required? As for portability, I mean can just share the script and the data right?

    • disgruntledphd2 16 hours ago

      If you want to build data applications, it's extremely helpful. For instance, if you built some marketing models making it easier for marketers to work with these will pay off significantly.

hatmatrix 18 hours ago

Both.

There are some optimizations that can be made a compile-time that can speed up the computations. It also makes it portable provided that the executables are provided for each desired platform.